End of Life Ruby 3.2 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →
instance method
ERB#result_with_hash
result_with_hash(hash)
lib/erb.rb
View on GitHub ↗
# File tmp/rubies/ruby-3.2.0/lib/erb.rb, line 433
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
Render a template on a new toplevel binding with local variables specified by a Hash object.