Hi --

On Fri, 23 Dec 2005, Brian Mitchell wrote:

> On 12/22/05, J. Ryan Sobol <ryansobol / gmail.com> wrote:
>> Excuse my newbi-ness, but isn't that "self rule" for class methods
>> similar in Ruby?  E.g.
>>
>> class A
>>         def self.a_class_method
>>                 puts "A class method"
>>         end
>> # OR
>>         def A.another_class_method
>>                 puts "Another class method"
>>         end
>> end
>
> OR
>
> class A
>  class << self
>    def foo; end
>  end
> end
>
> OR
>
> class A
>  class << A
>    def foo; end
>  end
> end

Also:

   class A
   end

and then:

   class << A
     def foo; end
   end

or

   def A.foo
   end


David

-- 
David A. Black
dblack / wobblini.net

"Ruby for Rails", from Manning Publications, coming April 2006!
http://www.manning.com/books/black