Class: Wayfarer::Routing::HostMatcher
- Inherits:
-
Object
- Object
- Wayfarer::Routing::HostMatcher
- Defined in:
- lib/wayfarer/routing/host_matcher.rb
Instance Attribute Summary collapse
-
#host ⇒ Object
readonly
Returns the value of attribute host.
Instance Method Summary collapse
-
#initialize(host) ⇒ HostMatcher
constructor
A new instance of HostMatcher.
-
#match(url) ⇒ Object
rubocop:disable Style/CaseEquality.
-
#params(_) ⇒ Object
rubocop:enable Style/CaseEquality.
Constructor Details
#initialize(host) ⇒ HostMatcher
Returns a new instance of HostMatcher.
8 9 10 |
# File 'lib/wayfarer/routing/host_matcher.rb', line 8 def initialize(host) @host = host end |
Instance Attribute Details
#host ⇒ Object (readonly)
Returns the value of attribute host.
6 7 8 |
# File 'lib/wayfarer/routing/host_matcher.rb', line 6 def host @host end |
Instance Method Details
#match(url) ⇒ Object
rubocop:disable Style/CaseEquality
13 14 15 |
# File 'lib/wayfarer/routing/host_matcher.rb', line 13 def match(url) @host === url.host end |
#params(_) ⇒ Object
rubocop:enable Style/CaseEquality
18 19 20 |
# File 'lib/wayfarer/routing/host_matcher.rb', line 18 def params(_) {} end |