This post originated from an RSS feed registered with Ruby Buzz
by Matt Williams.
Original Post: Ruby Bindings and Scope
Feed Title: Ruby Blender
Feed URL: http://feeds2.feedburner.com/RubyBlender
Feed Description: This blog contains short-ish ruby tips, hints, and techniques.
One of the features of Ruby’s Kernel module (which is imported into Object, so it’s available in every class) is the binding. The binding allows you to keep a pointer to the scope at a particular location in your application and then later evaluate code from that location.
For example (and this came up as the [...]