I had low expectations of method_source helping me, so I might be way out of bounds here.
I'm writing a little gem called arg-that which provides a method that takes a block. To give better test messages, I was hoping to use method_source (or similar) to print the content of the arg_that blocks.
I had low expectations of method_source helping me, so I might be way out of bounds here.
I'm writing a little gem called arg-that which provides a method that takes a block. To give better test messages, I was hoping to use method_source (or similar) to print the content of the
arg_that
blocks.Here's a little example:
In the above, calling
#inspect
on the block passed toarg_that
will raise the following: