Class: Controll::Flow::Action::Fallback
- Defined in:
- lib/controll/flow/action/fallback.rb
Instance Attribute Summary collapse
-
#controller ⇒ Object
readonly
Returns the value of attribute controller.
-
#event ⇒ Object
readonly
Returns the value of attribute event.
Attributes inherited from Base
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(controller, event = nil) ⇒ Fallback
constructor
A new instance of Fallback.
- #perform ⇒ Object
- #type ⇒ Object
Methods inherited from Base
Constructor Details
#initialize(controller, event = nil) ⇒ Fallback
Returns a new instance of Fallback.
5 6 7 8 |
# File 'lib/controll/flow/action/fallback.rb', line 5 def initialize controller, event = nil @controller = controller @event = event if event end |
Instance Attribute Details
#controller ⇒ Object (readonly)
Returns the value of attribute controller.
3 4 5 |
# File 'lib/controll/flow/action/fallback.rb', line 3 def controller @controller end |
#event ⇒ Object (readonly)
Returns the value of attribute event.
3 4 5 |
# File 'lib/controll/flow/action/fallback.rb', line 3 def event @event end |
Class Method Details
.action(controller, event = nil) ⇒ Object
20 21 22 |
# File 'lib/controll/flow/action/fallback.rb', line 20 def action controller, event = nil self.new controller, event end |
Instance Method Details
#perform ⇒ Object
10 11 12 13 |
# File 'lib/controll/flow/action/fallback.rb', line 10 def perform error_check! if event controller.do_fallback self end |
#type ⇒ Object
15 16 17 |
# File 'lib/controll/flow/action/fallback.rb', line 15 def type :fallback end |