Class: Drillbit::Matchers::Subdomain
- Inherits:
-
Object
- Object
- Drillbit::Matchers::Subdomain
- Defined in:
- lib/drillbit/matchers/subdomain.rb
Instance Attribute Summary collapse
-
#allowed_api_subdomains ⇒ Object
Returns the value of attribute allowed_api_subdomains.
-
#allowed_subdomains ⇒ Object
Returns the value of attribute allowed_subdomains.
-
#request ⇒ Object
Returns the value of attribute request.
Instance Method Summary collapse
-
#initialize(allowed_subdomains: Drillbit.configuration.allowed_subdomains, allowed_api_subdomains: Drillbit.configuration.allowed_api_subdomains) ⇒ Subdomain
constructor
A new instance of Subdomain.
- #matches?(request) ⇒ Boolean
- #matches_api_subdomain?(request) ⇒ Boolean
Constructor Details
#initialize(allowed_subdomains: Drillbit.configuration.allowed_subdomains, allowed_api_subdomains: Drillbit.configuration.allowed_api_subdomains) ⇒ Subdomain
Returns a new instance of Subdomain.
10 11 12 13 14 15 |
# File 'lib/drillbit/matchers/subdomain.rb', line 10 def initialize(allowed_subdomains: Drillbit.configuration.allowed_subdomains, allowed_api_subdomains: Drillbit.configuration.allowed_api_subdomains) self.allowed_subdomains = Array(allowed_subdomains) self.allowed_api_subdomains = Array(allowed_api_subdomains) end |
Instance Attribute Details
#allowed_api_subdomains ⇒ Object
Returns the value of attribute allowed_api_subdomains.
6 7 8 |
# File 'lib/drillbit/matchers/subdomain.rb', line 6 def allowed_api_subdomains @allowed_api_subdomains end |
#allowed_subdomains ⇒ Object
Returns the value of attribute allowed_subdomains.
6 7 8 |
# File 'lib/drillbit/matchers/subdomain.rb', line 6 def allowed_subdomains @allowed_subdomains end |
#request ⇒ Object
Returns the value of attribute request.
6 7 8 |
# File 'lib/drillbit/matchers/subdomain.rb', line 6 def request @request end |