Class: WhatThe::RouteMatcher::Matcher
- Defined in:
- lib/what_the/route_matcher.rb
Instance Attribute Summary collapse
-
#route_controller ⇒ Object
readonly
Returns the value of attribute route_controller.
-
#route_params ⇒ Object
readonly
Returns the value of attribute route_params.
-
#with_params ⇒ Object
readonly
Returns the value of attribute with_params.
Instance Method Summary collapse
-
#initialize(route_controller, params = {}) ⇒ Matcher
constructor
A new instance of Matcher.
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_controller ⇒ Object (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_params ⇒ Object (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_params ⇒ Object (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 |