From: Henry Maddocks Date: 2012-07-27T10:33:16+09:00 Subject: Re: Attr_accessor and reader and writer convert it to normal Methods style! On 27/07/2012, at 1:09 PM, Ruby Sea wrote: > How can i express the attributes methods using normal method styles (the > long coding way) to define them? > > > attr_accessor :name > attr_writer :name > attr_reader :legs, :arms These are the equivalent of... # attr_accessor :name def name= value @name = value end def name @name end # attr_writer :name def name= value @name = value end # attr_reader :legs, :arms def legs @legs end def arms @arms end Henry