class ERB
def result_with_hash(hash)
Render a template on a new toplevel binding with local variables specified
def result_with_hash(hash) b = new_toplevel(hash.keys) hash.each_pair do |key, value| b.local_variable_set(key, value) end result(b) end