On Jan 6, 2006, at 8:20 AM, John Maclean wrote:

> Is i) and ii) just two different methods for initialising?
>
> i)
>  class Song
>   attr_reader :name, :artist, :
>  end

If you remove the trailing , and :, the above is equivalent to:

class Song
   def name
     @name
   end
   def artist
     @artist
   end
end

No variables are set by this code, so no, it's not a method of  
initialization.

Hope that helps.

James Edward Gray II