Class: Controll::Flow::Action::PathAction
- Defined in:
- lib/controll/flow/action/path_action.rb
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
Methods inherited from Base
Constructor Details
This class inherits a constructor from Controll::Flow::Action::Base
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(method_name, *args, &block) ⇒ Object (protected)
useful for path helpers used in event maps
16 17 18 19 20 21 22 |
# File 'lib/controll/flow/action/path_action.rb', line 16 def method_missing(method_name, *args, &block) if controller.respond_to? method_name controller.send method_name, *args, &block else super end end |
Instance Method Details
#perform ⇒ Object
3 4 5 6 7 |
# File 'lib/controll/flow/action/path_action.rb', line 3 def perform raise BadPathError, "Bad path: #{path}" if path.blank? error_check! controller.send controller_action, self end |
#resolved_path ⇒ Object
9 10 11 |
# File 'lib/controll/flow/action/path_action.rb', line 9 def resolved_path controller.send(path) end |