Class: TurboReflex::ControllerPack
- Inherits:
-
Object
- Object
- TurboReflex::ControllerPack
- Defined in:
- lib/turbo_reflex/controller_pack.rb
Instance Attribute Summary collapse
-
#controller ⇒ Object
readonly
Returns the value of attribute controller.
-
#reflex ⇒ Object
readonly
Returns the value of attribute reflex.
-
#runner ⇒ Object
readonly
Returns the value of attribute runner.
Instance Method Summary collapse
- #errored? ⇒ Boolean
-
#initialize(controller) ⇒ ControllerPack
constructor
A new instance of ControllerPack.
- #performed? ⇒ Boolean
- #render ⇒ Object
- #requested? ⇒ Boolean
Constructor Details
#initialize(controller) ⇒ ControllerPack
Returns a new instance of ControllerPack.
25 26 27 28 29 |
# File 'lib/turbo_reflex/controller_pack.rb', line 25 def initialize(controller) @controller = controller @runner = TurboReflex::Runner.new(controller) @reflex = runner.reflex_instance end |
Instance Attribute Details
#controller ⇒ Object (readonly)
Returns the value of attribute controller.
6 7 8 |
# File 'lib/turbo_reflex/controller_pack.rb', line 6 def controller @controller end |
#reflex ⇒ Object (readonly)
Returns the value of attribute reflex.
6 7 8 |
# File 'lib/turbo_reflex/controller_pack.rb', line 6 def reflex @reflex end |
#runner ⇒ Object (readonly)
Returns the value of attribute runner.
6 7 8 |
# File 'lib/turbo_reflex/controller_pack.rb', line 6 def runner @runner end |
Instance Method Details
#errored? ⇒ Boolean
39 40 41 |
# File 'lib/turbo_reflex/controller_pack.rb', line 39 def errored? runner.reflex_errored? end |
#performed? ⇒ Boolean
35 36 37 |
# File 'lib/turbo_reflex/controller_pack.rb', line 35 def performed? runner.reflex_performed? end |
#render ⇒ Object
43 44 45 |
# File 'lib/turbo_reflex/controller_pack.rb', line 43 def render(...) reflex.render_response(...) end |
#requested? ⇒ Boolean
31 32 33 |
# File 'lib/turbo_reflex/controller_pack.rb', line 31 def requested? runner.reflex_requested? end |