Class: RoadForest::Dispatcher::RouteMap

Inherits:
Object
  • Object
show all
Defined in:
lib/roadforest/application/dispatcher.rb

Defined Under Namespace

Classes: Configurator

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeRouteMap

Returns a new instance of RouteMap.



123
124
# File 'lib/roadforest/application/dispatcher.rb', line 123

def initialize
end

Instance Attribute Details

#from_nameObject

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_paramsObject

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_nameObject

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_nameObject

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

Returns:

  • (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