Project

General

Profile

Actions

Feature #8631

closed

Add a new method to ERB to allow assigning the local variables from a hash

Added by rosenfeld (Rodrigo Rosenfeld Rosas) over 10 years ago. Updated almost 7 years ago.

Status:
Closed
Target version:
[ruby-core:55985]

Description

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) feature-8631.pdf Slide for proposal rosenfeld (Rodrigo Rosenfeld Rosas), 06/26/2014 12:49 PM

Related issues 1 (0 open1 closed)

Related to Ruby master - Feature #8643: Add Binding.from_hashRejectedko1 (Koichi Sasada)Actions
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0