class Apiphobic::Matchers::Subdomain
Attributes
allowed_subdomains[RW]
request[RW]
Public Class Methods
new(allowed_subdomains:)
click to toggle source
# File lib/apiphobic/matchers/subdomain.rb, line 9 def initialize(allowed_subdomains:) self.allowed_subdomains = Array(allowed_subdomains) end
Public Instance Methods
matches?(request)
click to toggle source
# File lib/apiphobic/matchers/subdomain.rb, line 13 def matches?(request) self.request = request allowed_subdomains.include? request.subdomain end