Class: RoadForest::Dispatcher::RouteMap
- Inherits:
-
Object
- Object
- RoadForest::Dispatcher::RouteMap
- Defined in:
- lib/roadforest/application/dispatcher.rb
Defined Under Namespace
Classes: Configurator
Instance Attribute Summary collapse
-
#from_name ⇒ Object
Returns the value of attribute from_name.
-
#from_params ⇒ Object
Returns the value of attribute from_params.
-
#in_name ⇒ Object
Returns the value of attribute in_name.
-
#to_name ⇒ Object
Returns the value of attribute to_name.
Instance Method Summary collapse
-
#initialize ⇒ RouteMap
constructor
A new instance of RouteMap.
- #matches?(in_name, name, params) ⇒ Boolean
Constructor Details
#initialize ⇒ RouteMap
Returns a new instance of RouteMap.
123 124 |
# File 'lib/roadforest/application/dispatcher.rb', line 123 def initialize end |
Instance Attribute Details
#from_name ⇒ Object
Returns the value of attribute from_name.
125 126 127 |
# File 'lib/roadforest/application/dispatcher.rb', line 125 def from_name @from_name end |
#from_params ⇒ Object
Returns the value of attribute from_params.
125 126 127 |
# File 'lib/roadforest/application/dispatcher.rb', line 125 def from_params @from_params end |
#in_name ⇒ Object
Returns the value of attribute in_name.
125 126 127 |
# File 'lib/roadforest/application/dispatcher.rb', line 125 def in_name @in_name end |
#to_name ⇒ Object
Returns the value of attribute to_name.
125 126 127 |
# File 'lib/roadforest/application/dispatcher.rb', line 125 def to_name @to_name end |
Instance Method Details
#matches?(in_name, name, params) ⇒ Boolean
127 128 129 130 131 132 |
# File 'lib/roadforest/application/dispatcher.rb', line 127 def matches?(in_name, name, params) return false unless in_name == @in_name return false unless name == @from_name return false unless @from_params.all?{|name| params.has_key?(name)} return true end |