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