Class: Apill::Matchers::SubdomainMatcher
- Inherits:
-
Object
- Object
- Apill::Matchers::SubdomainMatcher
- Defined in:
- lib/apill/matchers/subdomain_matcher.rb
Instance Method Summary collapse
-
#initialize(subdomain: 'api') ⇒ SubdomainMatcher
constructor
A new instance of SubdomainMatcher.
- #matches?(request) ⇒ Boolean
Constructor Details
#initialize(subdomain: 'api') ⇒ SubdomainMatcher
4 5 6 |
# File 'lib/apill/matchers/subdomain_matcher.rb', line 4 def initialize(subdomain: 'api') self.subdomain = subdomain end |
Instance Method Details
#matches?(request) ⇒ Boolean
8 9 10 |
# File 'lib/apill/matchers/subdomain_matcher.rb', line 8 def matches?(request) request.subdomains.first == subdomain end |