S
Shea Martin
I have a function:
def worker( &p_block )
....
p_block.call( my_data )
....
end
I have a wrapper function, that I would like to use to call 'worker'.
But I would like the caller of 'wrapper' to be able to specify the block
'wrapper' will use. i.e.,
def wrapper( &p_block )
....
worker{ p_block }
end
I suspect that this is possible, but I can't seem to nail the syntax.
?
~S
def worker( &p_block )
....
p_block.call( my_data )
....
end
I have a wrapper function, that I would like to use to call 'worker'.
But I would like the caller of 'wrapper' to be able to specify the block
'wrapper' will use. i.e.,
def wrapper( &p_block )
....
worker{ p_block }
end
I suspect that this is possible, but I can't seem to nail the syntax.
?
~S