On 3/22/06, Jim Weirich <jim / weirichhouse.org> wrote:
> Robert Klemme wrote:
>
>   class Color
>     ...
>     class << self
>       def red
>         @red ||= new 255, 0, 0
>       end
>       ...
>     end
>   end

Is there any difference between the above code and this?

   class Color
     ...
     def self.red
         @red ||= new 255, 0, 0
     end
     ...
   end

--
R. Mark Volkmann
Object Computing, Inc.