Class: MagicLamp::RenderCatcher
- Inherits:
-
Object
- Object
- MagicLamp::RenderCatcher
- Includes:
- Callbacks
- Defined in:
- lib/magic_lamp/render_catcher.rb
Instance Attribute Summary collapse
-
#render_argument ⇒ Object
Returns the value of attribute render_argument.
Attributes included from Callbacks
Instance Method Summary collapse
- #first_render_argument(&block) ⇒ Object
- #method_missing(method, *args, &block) ⇒ Object
- #render(first_arg, *args) ⇒ Object
Methods included from Callbacks
#execute_after_each_callback, #execute_before_each_callback, #execute_callbacks_around, #initialize
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(method, *args, &block) ⇒ Object
18 19 20 |
# File 'lib/magic_lamp/render_catcher.rb', line 18 def method_missing(method, *args, &block) self end |
Instance Attribute Details
#render_argument ⇒ Object
Returns the value of attribute render_argument.
7 8 9 |
# File 'lib/magic_lamp/render_catcher.rb', line 7 def render_argument @render_argument end |
Instance Method Details
#first_render_argument(&block) ⇒ Object
13 14 15 16 |
# File 'lib/magic_lamp/render_catcher.rb', line 13 def first_render_argument(&block) execute_callbacks_around { instance_eval(&block) } render_argument end |
#render(first_arg, *args) ⇒ Object
9 10 11 |
# File 'lib/magic_lamp/render_catcher.rb', line 9 def render(first_arg, *args) self.render_argument = first_arg end |