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
#light_to_sentence, #light_to_word, #new_grouping?, #render, #replace_tabs, #title
Constructor Details
#initialize(locals) ⇒ TemplateBinder
Returns a new instance of TemplateBinder.
76 77 78 79 80 |
# File 'lib/ciat/erb_helpers.rb', line 76 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
82 83 84 |
# File 'lib/ciat/erb_helpers.rb', line 82 def get_binding binding end |