Methods
[]
[]=
Public Instance methods
Returns the value of some variable.
a = 2 binding["a"] #=> 2
[ + ]
# File lib/more/facets/binding/opvars.rb, line 10 def []( x ) eval( x.to_s ) end
Set the value of a local variable.
binding["a"] = 4 a #=> 4
[ + ]
# File lib/more/facets/binding/opvars.rb, line 19 def []=( l, v ) eval( "lambda {|v| #{l} = v}").call( v ) end