ajsharp/bldr — pull request #26 by lafave (2013-02-19 05:46:04+00:00)
Title: Add access to instance variables from within nested blocks

#### This PR
* Copies instance variables from a parent node when a new node is created that has a parent so that nested blocks have access to the instance variables.
* Not all instance variables are copied into the child's context, specifically instance variables sharing a name used in the `attr_reader` helper.

#### Gotcha
```ruby
object :user => @user do
# Raises an error unless @user has @bar as an instance method
# since this block is instance_eval'd on current_object, which
# in this case is @user.
attribute(:bad_foo) { @bar }

# Workaround; the block is simply call'd with current_object as
# the one and only parameter which in this case we don't care
# about so can set to _.
attribute(:good_foo) { |_| @bar }
end
```