Re: Custom class

Colin Law
Tue, 06 Oct 2009 10:26:12 -0000

2009/10/6 Pål Bergström
<rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org>:
>
> Colin Law wrote:
>> 2009/10/6 Pål Bergström
<rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org>:
>
>> If you want to call it like that you must make test a class method
>> rather than an instance method, so it must be
>> def self.test
>> ..
>>
>> Colin
>
> Thanks. I don''t fully understand but it works.
>
> This means you don''t need to require it (?)

Whether it is a class or instance method is nothing to do with
requiring or not, it is just a fundamental of Ruby syntax.

Colin

> --
> Posted via http://www.ruby-forum.com/.
>
> >
>