class Hash

refactormycode.com/codes/281-given-a-hash-of-variables-render-an-erb-template

Public Instance Methods

to_binding(object = Object.new) click to toggle source
# 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