You likely need to reference "myFunc.myDerp" instead.

On Fri, Aug 25, 2017 at 10:33 AM, red 888 <fakemailred...@gmail.com> 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-users+unsubscr...@googlegroups.com.
> 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/CAA5t8Vq4OtUyyvST%2BgJmMddVCfu2AH8q8%2Bq57ZRV0D2n-nQ0xQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to