mavenlink/brainstem — pull request #5 by Simonify (2013-05-10 00:07:32+00:00)
Title: Allow usage of lambdas in place of method_name argument.

Allow the `association(method_name = nil, options = {}, &block)` method to take a lambda/block if a `method_name` is not provided.

Also includes a change which allows the order of arguments sent to association to be in any order (`association(*args, &block)` - if an arg is a `String`/`Symbol` then we use it as the `method_name` or if it's a `Hash` then we use it as an options hash).

I'm not yet raising an exception when a lamda is used without a `:json_name` as the existing specs (before we cut our branch) use lambdas without a `:json_name` which we need to look in to more. I'll let you know when we think it's 100% clean to merge.