Class: Controll::Enabler::PathHandler
- Inherits:
-
Object
- Object
- Controll::Enabler::PathHandler
- Defined in:
- lib/controll/enabler/path_handler.rb
Instance Attribute Summary collapse
-
#controller ⇒ Object
readonly
Returns the value of attribute controller.
-
#options ⇒ Object
readonly
Returns the value of attribute options.
-
#path ⇒ Object
readonly
Returns the value of attribute path.
-
#type ⇒ Object
(also: #control_action)
readonly
Returns the value of attribute type.
Class Method Summary collapse
Instance Method Summary collapse
- #execute(*args) ⇒ Object
-
#initialize(controller, type) ⇒ PathHandler
constructor
A new instance of PathHandler.
Constructor Details
#initialize(controller, type) ⇒ PathHandler
Returns a new instance of PathHandler.
5 6 7 |
# File 'lib/controll/enabler/path_handler.rb', line 5 def initialize controller, type @controller, @type = [controller, type] end |
Instance Attribute Details
#controller ⇒ Object (readonly)
Returns the value of attribute controller.
3 4 5 |
# File 'lib/controll/enabler/path_handler.rb', line 3 def controller @controller end |
#options ⇒ Object (readonly)
Returns the value of attribute options.
3 4 5 |
# File 'lib/controll/enabler/path_handler.rb', line 3 def @options end |
#path ⇒ Object (readonly)
Returns the value of attribute path.
3 4 5 |
# File 'lib/controll/enabler/path_handler.rb', line 3 def path @path end |
#type ⇒ Object (readonly) Also known as: control_action
Returns the value of attribute type.
3 4 5 |
# File 'lib/controll/enabler/path_handler.rb', line 3 def type @type end |
Class Method Details
.redirecter(controller, map) ⇒ Object
13 14 15 |
# File 'lib/controll/enabler/path_handler.rb', line 13 def self.redirecter controller, map self.new controller, map, :redirect end |
.renderer(controller, map) ⇒ Object
9 10 11 |
# File 'lib/controll/enabler/path_handler.rb', line 9 def self.renderer controller, map self.new controller, map, :render end |
Instance Method Details
#execute(*args) ⇒ Object
17 18 19 20 21 |
# File 'lib/controll/enabler/path_handler.rb', line 17 def execute *args extract! *args process_notifications path ? handle_path : fallback end |