[ruby-core:63344] [ruby-trunk - Feature #8631] Add a new method to ERB to allow assigning the local variables from a hash

From: rr.rosas@...
Date: 2014-06-26 12:49:24 UTC
List: ruby-core #63344
Issue #8631 has been updated by Rodrigo Rosenfeld Rosas.

File feature-8631.pdf added

Attached slide for proposal

----------------------------------------
Feature #8631: Add a new method to ERB to allow assigning the local variables from a hash
https://bugs.ruby-lang.org/issues/8631#change-47391

* Author: Rodrigo Rosenfeld Rosas
* Status: Assigned
* Priority: Low
* Assignee: Masatoshi Seki
* Category: 
* Target version: 
----------------------------------------
It would be interesting if ERB could allow a hash instead of a binding for processing the template.

We wouldn't have to do hacks like:

b = OpenStruct.new(hash).instance_eval{ binding }


---Files--------------------------------
feature-8631.pdf (27.7 KB)


-- 
https://bugs.ruby-lang.org/

In This Thread