Class: Hash

Inherits:
Object
  • Object
show all
Defined in:
lib/pwl/message.rb

Overview

Instance Method Summary collapse

Instance Method Details

#to_binding(object = Object.new) ⇒ Object



5
6
7
8
# File 'lib/pwl/message.rb', line 5

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