Class: WhatThe::RouteMatcher::Matcher

Inherits:
Object
  • Object
show all
Defined in:
lib/what_the/route_matcher.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(route_controller, params = {}) ⇒ Matcher

Returns a new instance of Matcher.



5
6
7
8
9
# File 'lib/what_the/route_matcher.rb', line 5

def initialize(route_controller, params = {})
  @route_controller = route_controller.to_s
  @route_params = params
  @with_params = params.map{|key, value| ":#{key} => #{value}"}.join(' ')
end

Instance Attribute Details

#route_controllerObject (readonly)

Returns the value of attribute route_controller.



4
5
6
# File 'lib/what_the/route_matcher.rb', line 4

def route_controller
  @route_controller
end

#route_paramsObject (readonly)

Returns the value of attribute route_params.



4
5
6
# File 'lib/what_the/route_matcher.rb', line 4

def route_params
  @route_params
end

#with_paramsObject (readonly)

Returns the value of attribute with_params.



4
5
6
# File 'lib/what_the/route_matcher.rb', line 4

def with_params
  @with_params
end