Class: Lux::InlineRenderProxy
- Defined in:
- lib/lux/template/inline_render_proxy.rb
Instance Method Summary collapse
-
#initialize(context, &block) ⇒ InlineRenderProxy
constructor
A new instance of InlineRenderProxy.
- #method_missing(name, value = nil) ⇒ Object
Constructor Details
#initialize(context, &block) ⇒ InlineRenderProxy
Returns a new instance of InlineRenderProxy.
8 9 10 11 |
# File 'lib/lux/template/inline_render_proxy.rb', line 8 def initialize context, &block @context = context @block = block end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(name, value = nil) ⇒ Object
13 14 15 16 17 18 19 20 21 |
# File 'lib/lux/template/inline_render_proxy.rb', line 13 def method_missing name, value=nil name = name.to_s if name.sub!('=', '') @context.instance_variable_set("@_#{name}", value) end @context.instance_variable_get("@_#{name}") end |