On Thu, Apr 18, 2013 at 11:41 PM, Scott Shaffer <lists / ruby-forum.com>wrote:


> I like even more that you can include a module:
>

In other words: Struct generated classes are ordinary classes and the block
passed to Struct.new is a class body as is the one passed to Class.new - no
surprises here. :-)

irb(main):001:0> c=Class.new do
irb(main):002:1* def foo; 123 end
irb(main):003:1> end
=> #<Class:0x8335bb4>
irb(main):004:0> c.new.foo
=> 123


Kind regards

robert


-- 
remember.guy do |as, often| as.you_can - without end
http://blog.rubybestpractices.com/