Sha256: 5085fb6f70adaa164557ffa97162dd6cfb061eef91c356b2e986b0b00f840273
Contents?: true
Size: 332 Bytes
Versions: 23
Compression:
Stored size: 332 Bytes
Contents
require 'facets/binding/eval' class Binding # Returns the value of some variable. # # a = 2 # binding["a"] #=> 2 # def []( x ) eval( x.to_s ) end # Set the value of a local variable. # # binding["a"] = 4 # a #=> 4 # def []=( l, v ) eval( "lambda {|v| #{l} = v}").call( v ) end end
Version data entries
23 entries across 22 versions & 3 rubygems