From: Neville Franks Date: 2007-01-26T09:13:26+09:00 Subject: Re: Ruby language question Jeremy, Thanks for the prompt reply. I understand what the code is doing but don't understand the meaning/use of the line: def size=(val) in particular the =(val) part. Doesn't the lime: @size = val perform the actual assignment. --- Neville Franks, http://www.getsoft.com http://www.surfulater.com Jeremy McAnally wrote: > That is setting an attribute, which essentially means you can do this: > > class MyClass > include Mod > end > > x = MyClass.new > x.size = 9 > => 9 > x.size > => 9 > > --Jeremy > > On 1/25/07, Neville Franks wrote: >> end >> >> > > > -- > My free Ruby e-book: > http://www.humblelittlerubybook.com/book/ > > My blogs: > http://www.mrneighborly.com/ > http://www.rubyinpractice.com/ -- Posted via http://www.ruby-forum.com/.