Class: Wayfarer::Routing::URLMatcher
- Inherits:
-
Object
- Object
- Wayfarer::Routing::URLMatcher
- Defined in:
- lib/wayfarer/routing/url_matcher.rb
Instance Attribute Summary collapse
-
#url ⇒ Object
readonly
Returns the value of attribute url.
Instance Method Summary collapse
-
#initialize(url) ⇒ URLMatcher
constructor
A new instance of URLMatcher.
- #match(url) ⇒ Object
- #params(_) ⇒ Object
Constructor Details
#initialize(url) ⇒ URLMatcher
Returns a new instance of URLMatcher.
8 9 10 |
# File 'lib/wayfarer/routing/url_matcher.rb', line 8 def initialize(url) @url = url end |
Instance Attribute Details
#url ⇒ Object (readonly)
Returns the value of attribute url.
6 7 8 |
# File 'lib/wayfarer/routing/url_matcher.rb', line 6 def url @url end |
Instance Method Details
#match(url) ⇒ Object
12 13 14 |
# File 'lib/wayfarer/routing/url_matcher.rb', line 12 def match(url) url == URI(@url) end |
#params(_) ⇒ Object
16 17 18 |
# File 'lib/wayfarer/routing/url_matcher.rb', line 16 def params(_) {} end |