Generally if you have both instance methods and class methods, you'd
make the class methods static and add meta = true to the JRubyMethod
annotation.

If you define only class methods, meta = true is not necessary if you
defineAnnotatedMethods using the singleton class
(myClass.getSingletonClass().defineAnnotatedMethods(...)).

- Charlie

On Sun, Apr 19, 2015 at 2:28 PM, Chamila Wijayarathna
<cdwijayarat...@gmail.com> wrote:
> Hello all,
>
> I'm working on creating a simple gem 'fibs' with few simple functions.
> I have implemented a class 'Sequence' and a object method for it.
> https://github.com/cdwijayarathna/GemTest
> I like to add some class level functions (i.e. Fibs.Sequence.add(a,b)) and
> module level functions (Fibs.sub(a,b)) to this gem.
> How can I do this?
>
> Thank You!
>
> --
> Chamila Dilshan Wijayarathna,
> SMIEEE, SMIESL,
> Undergraduate,
> Department of Computer Science and Engineering,
> University of Moratuwa.

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to