From: 7stud -- Date: 2012-12-11T16:02:20+09:00 Subject: Re: Need a little help Setter: def some_var_name=(val) @some_var_name = val end Getter: def some_var_name @some_var_name end To set a value, there has to be a setter defined. To retrieve a value, e.g. puts obj.some_var_name there has to be a getter defined. You canmake ruby define both the setter and getter for you if you include the following in your class: attr_accessor :some_var_name Or, if you don't want people to be able to set the value, you can define only the getter: attr_reader :some_var_name (you can also define the getter manually). Etc. -- Posted via http://www.ruby-forum.com/.