You can do this:
import static org.matz.utils.Jira.*
import org.matz.utils.Jira
Jira.createTicket()
createTicket()
Note: Methods are *always* in a class. Most likely Groovy is creating a
Script class for you.
On Apr 7, 2016 12:16 PM, "Guy Matz" wrote:
OK! Putting the static methods in classes
OK! Putting the static methods in classes as described above allows me to
call Jira,createTicket, but not createTicket. Should I be able to do
that? A point to a relevant doc would be fine! :-)
Thanks again, all!
On Thu, Apr 7, 2016 at 12:01 PM, Guy Matz wrote:
> Thanks for the reply! The
Thanks for the reply! The thing is, though, that my static methods are not
within a class . . . does that make a difference?
One other thing: When I try to call createTicket() as jira.createTicket() I
get:
groovy:000> jira.createTicket()
Unknown property: jira
Any other thoughts would be greatly
Math is a class, not a package. So if you create a class jira (it really should
at least start with a capital in Groovy, so JIRA or Jira) with static methods,
you can access it like you do with Math. Note in your example, “import static
java.lang.Math.*” actually is allowing you to use constants
Hello! I have some static methods defined and am able to access them after
I import, e,.g.
import static org.matz.utils.jira.*
With that import I can call the methods, e.g. createTicket, but I would
like to be able to call it as *jira*.createTicket, as is possible with the
Math package, e.g.
imp
I like the concepts behind BountySource but I've never actively used the
platform. I for one would like to support Groovy that way.
On 6 April 2016 at 20:13, Gerald Wiltse wrote:
> https://salt.bountysource.com/
>
> I have no experience with this service, and have not researched it deeply,
> but