From: Lars Olsson Date: 2007-02-15T02:50:14+09:00 Subject: Re: Initializing dynamic instance methods Thanks, the worked flawlessly. I just added an else clause so that I can have other default values than nil. class Parent def self.foo() module_eval("def foo(); if defined?(@foo) then @foo else nil end; end") module_eval("def foo=(newfoo); @foo = newfoo; end") end end class Child < Parent foo end c = Child.new p c.foo /lasso