Class: CIAT::TemplateBinder
- Inherits:
-
Object
- Object
- CIAT::TemplateBinder
- Includes:
- ERBHelpers
- Defined in:
- lib/ciat/erb_helpers.rb
Overview
Assists in binding local variables for a recursive render.
Instance Method Summary collapse
- #get_binding ⇒ Object
-
#initialize(locals) ⇒ TemplateBinder
constructor
A new instance of TemplateBinder.
Methods included from ERBHelpers
#filename_to_id, #light_to_sentence, #light_to_word, #new_grouping?, #render, #replace_tabs, #title
Constructor Details
#initialize(locals) ⇒ TemplateBinder
Returns a new instance of TemplateBinder.
81 82 83 84 85 |
# File 'lib/ciat/erb_helpers.rb', line 81 def initialize(locals) locals.each do |variable, value| self.class.send(:define_method, variable, Proc.new {value}) end end |
Instance Method Details
#get_binding ⇒ Object
87 88 89 |
# File 'lib/ciat/erb_helpers.rb', line 87 def get_binding binding end |