I am curious how I can capture a block that was passed. Here's what I'm
trying to do:
class BaseClass
def initialize( arg1 )
puts "got a block" if block_given?
end
end
class SubBaseClass < BaseClass
def initialize( arg1 , arg2 )
super( arg1 )
end
end
sbc = SubBaseClass.new( "aarg1" , "arg2" ) { puts "my block" }
I would like BaseClass to receive the block I passed to the SubBaseClass
constructor. I have tried a few variations, but nothing went.
Zach