From: 7stud -- Date: 2012-09-27T05:27:48+09:00 Subject: Re: Adding method on module class to yield and allow setting of attributes? > MyModule.configure do > foo = false > end That just creates a block local variable which is destroyed when the block ends. This block: > MyModule.configure do > @foo = false > end ...gets its bindings from the surrounding scope at the time the block executes, and at that time self is 'main' and the 'main' object has no method foo=() defined for it. You could do this: module MyModule class <