From: Chris Hulan Date: 2008-04-30T22:25:04+09:00 Subject: Re: How to create "def method(item)= (value)" ? Why not just access param? class Foo def initialize @param = {} end attr_accessor :param end x = Foo.new x.param['key'] = 'bar' If you do need to override it, the Hash assignment method is []= So I think you can write: def []=(key,value) ... Cheers