Class: ERB::Context
- Inherits:
-
Object
- Object
- ERB::Context
- Defined in:
- lib/erb/context.rb
Instance Method Summary collapse
-
#_binding ⇒ Object
———————————————————————— Returns the binding so that we can ship it off and give it to ERB.
-
#initialize(vars) ⇒ Context
constructor
———————————————————————— Wraps any data you wish to send to ERB limiting it’s context access.
Constructor Details
#initialize(vars) ⇒ Context
Wraps any data you wish to send to ERB limiting it’s context access.
15 16 17 18 19 |
# File 'lib/erb/context.rb', line 15 def initialize(vars) vars.each do |key, val| instance_variable_set("@#{key}", val) end end |
Instance Method Details
#_binding ⇒ Object
Returns the binding so that we can ship it off and give it to ERB.
25 26 27 |
# File 'lib/erb/context.rb', line 25 def _binding return binding end |