From: "Iñaki Baz Castillo" Date: 2008-04-30T23:04:26+09:00 Subject: Re: How to create "def method(item)= (value)" ? 2008/4/30, David A. Black : > object = Object.new > class << object > attr_accessor :params > end > object.params = {} > > def object.[]=(key,value) > @params[key] = value > end > > object[1] = 2 > > p object.params # { 1 => 2 } Oh, that seems really interesting, but unfortunatelly I can't unerstand at all what yuo do there. Specially I don't understand the meaning of first two lines: object = Object.new class << object What does that "class" mean?? Thanks a lot. -- Iñaki Baz Castillo