On Dec 9, 2010, at 12:57 , Richard Price wrote: > I would like to define two methods in a class > such that they could be called as follows > > value = obj.meth1(a,b) > > obj.meth2(a,b) = value > > I can code the first [accessor] method easily as > > def meth1(a,b) > > but how do I code the def statement for the second > [setter?] method? It is not possible in ruby to assign to a local variable to the right of an assignment (as written above).