Class: Hash

Inherits:
Object
  • Object
show all
Defined in:
lib/sambal/test_server.rb

Instance Method Summary collapse

Instance Method Details

#to_binding(object = Object.new) ⇒ Object


7
8
9
10
# File 'lib/sambal/test_server.rb', line 7

def to_binding(object = Object.new)
  object.instance_eval("def binding_for(#{keys.join(",")}) binding end")
  object.binding_for(*values)
end