Yup "myFunc.myDerp" works! So is this a groovy thing or is this part of the 
jenkins DSL? I tried googling, but not sure what this language feature is 
called.

On Friday, August 25, 2017 at 1:54:38 PM UTC-4, David Karr wrote:
>
> You likely need to reference "myFunc.myDerp" instead. 
>
> On Fri, Aug 25, 2017 at 10:33 AM, red 888 <fakemai...@gmail.com 
> <javascript:>> wrote: 
> > Im not sure if this is a groovy thing or a jenkins shared library DSL 
> thing 
> > but I don't understand how this automatic getter setter stuff works. 
> > 
> > I have this shared lib: 
> > /vars/myFunc.groovy 
> > 
> > I have this in it: 
> > def getDerp() { return something } 
> > def getHerp() { return something } 
> > 
> > Now in my jenkinsfile I can reference it like this: 
> > echo myFunc.derp 
> > echo myFunc.herp 
> > 
> > But I tried naming my methods like this: 
> > def getMyDerp() { return something } 
> > def getMyHerp() { return something } 
> > 
> > Now in my jenkinsfile I tried to do this: 
> > echo myFunc.myderp 
> > echo myFunc.myherp 
> > 
> > But that didn't work. 
> > 
> > I'm just curious how this works and if its possible to do method names 
> like 
> > getExtraHumps. 
> > 
> > 
> > -- 
> > You received this message because you are subscribed to the Google 
> Groups 
> > "Jenkins Users" group. 
> > To unsubscribe from this group and stop receiving emails from it, send 
> an 
> > email to jenkinsci-use...@googlegroups.com <javascript:>. 
> > To view this discussion on the web visit 
> > 
> https://groups.google.com/d/msgid/jenkinsci-users/96c6a471-a94c-4fc8-b3a8-d9ea95f26be4%40googlegroups.com.
>  
>
> > For more options, visit https://groups.google.com/d/optout. 
>

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/6a901e11-309c-4cba-b3a9-1f3ef274280f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to