Class: Controll::Enabler::PathResolver

Inherits:
Object
  • Object
show all
Defined in:
lib/controll/enabler/path_resolver.rb

Constant Summary collapse

ActionMapper =
Controll::Flow::ActionMapper
Action =
Controll::Flow::Action

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#callerObject (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_mapObject (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