That example wasn't quite what I meant, but I found it myself. Incase anyone else was following and is interested, here's the sort of syntax I was curious about:
class MyClass
def initialize &block
instance_eval &block
end
def foo
puts "hi"
end
end
MyClass.new { foo }
Thanks for pointing me in the right direction, Guy.
-Mat
···
On May 26, 2006, at 9:52 AM, ts wrote:
> Can you give a code example or documentation page?