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
16 17 18 |
# File 'lib/magic_lamp/render_catcher.rb', line 16 def method_missing(method, *args, &block) self end |
Instance Attribute Details
#render_argument ⇒ Object
Returns the value of attribute render_argument.
5 6 7 |
# File 'lib/magic_lamp/render_catcher.rb', line 5 def render_argument @render_argument end |
Instance Method Details
#first_render_argument(&block) ⇒ Object
11 12 13 14 |
# File 'lib/magic_lamp/render_catcher.rb', line 11 def first_render_argument(&block) execute_callbacks_around { instance_eval(&block) } render_argument end |
#render(first_arg, *args) ⇒ Object
7 8 9 |
# File 'lib/magic_lamp/render_catcher.rb', line 7 def render(first_arg, *args) self.render_argument = first_arg end |