basecrm/method_struct — pull request #2 by pithyless (2014-05-20 12:38:54+00:00)
Title: Add block support for methods

Here's a simplified kind of case I'm trying to solve. Thoughts?

```ruby
TimeoutRetryHandler = MethodStruct.new(:max_retries, :other_stuff) do
def call
tries = 0
begin
yield
rescue SomeTimeoutError => e
sleep_or_something
tries < max_retries ? retry : raise
end
end
end

TimeoutRetryHandler.call(max_retries: 3, ...) do
do_all_the_cool_stuff
end
```