Class: Controll::Enabler::PathResolver
- Inherits:
-
Object
- Object
- Controll::Enabler::PathResolver
- Defined in:
- lib/controll/enabler/path_resolver.rb
Constant Summary collapse
Instance Attribute Summary collapse
-
#caller ⇒ Object
(also: #controller)
readonly
Returns the value of attribute caller.
-
#event_map ⇒ Object
readonly
Returns the value of attribute event_map.
Instance Method Summary collapse
-
#initialize(caller, event_map) ⇒ PathResolver
constructor
A new instance of PathResolver.
- #resolve(action = nil) ⇒ Object
Constructor Details
#initialize(caller, event_map) ⇒ PathResolver
Returns a new instance of PathResolver.
8 9 10 11 |
# File 'lib/controll/enabler/path_resolver.rb', line 8 def initialize caller, event_map @caller = caller @event_map = event_map end |
Instance Attribute Details
#caller ⇒ Object (readonly) Also known as: controller
Returns the value of attribute caller.
3 4 5 |
# File 'lib/controll/enabler/path_resolver.rb', line 3 def caller @caller end |
#event_map ⇒ Object (readonly)
Returns the value of attribute event_map.
3 4 5 |
# File 'lib/controll/enabler/path_resolver.rb', line 3 def event_map @event_map end |
Instance Method Details
#resolve(action = nil) ⇒ Object
13 14 15 |
# File 'lib/controll/enabler/path_resolver.rb', line 13 def resolve action = nil @path ||= handle action end |