intridea/grape-entity — pull request #33 by wyattisimo (2013-11-01 14:22:47+00:00)
Title: support proper merging of nested conditionals

Currently, nested option blocks containing conditionals like this:
```ruby
with_options(:if => {:awesome => true}) do
with_options(:if => {:less_awesome => false}) do
expose :awesome_thing
end
end
```

will produce an exposure that reflects only the innermost conditions:
```ruby
{:if => {:less_awesome => false}}
```

To me, this is unexpected behavior. I would expect the following exposure from the code above:
```ruby
{:if => {:awesome => true, :less_awesome => false}}
```

This pull request enables merging (rather than overriding) nested conditionals with different keys. I've attempted to preserve existing override behavior for non-conditional options, conditionals with the same keys, and conditionals that are not Hashes (Procs and Symbols).