From: "bpettichord@..." Date: 2006-05-21T17:05:08+09:00 Subject: Re: foo= methods don't get called inside instance scope without explicit receiver I'm not sure of your specific situation, but i've found this to help in these circumstances: class Module def dsl_accessor(*symbols) symbols.each { |sym| class_eval %{ def #{sym}(*val) if val.empty? @#{sym} else @#{sym} = val.size == 1 ? val[0] : val end end } } end end Bar.dsl_accessor :foo b = Bar.new. b.instance_eval { foo 1 } #=> 1 b.instance_eval { foo } #=> 1 See http://www.artima.com/rubycs/articles/ruby_as_dsl3.html for more.