stevenjack/cfndsl — pull request #65 by Integralist (2014-09-17 12:07:42+00:00)
Title: Allow passing of lambda instead of a block

This change is a dependency for https://github.com/BBC-News/bbc-cosmos-tools/pull/10 which has built an abstraction around CFNDSL and needs to pass a `lambda` in place of a proper `{}` block.

We do this when calling:

```rb
CfnDsl::CloudFormationTemplate.new.declare(&block)
```

Because of the way the original code worked, it would pass a block back to the `declare` method multiple times and after the first call all other blocks passed into the method were Procs wrapping an eval error.

The original code would just handle this without triggering any errors, but when moving to a lambda a `#` would be raised and so I had to rescue that error as shown in this commit