class IpRestriction::AllowedIpsConstraint

Public Instance Methods

matches?(request) click to toggle source
# File lib/ip_restriction/allowed_ips_constraint.rb, line 3
def matches?(request)
  checker.allowed?(request.remote_ip)
end

Private Instance Methods

checker() click to toggle source
# File lib/ip_restriction/allowed_ips_constraint.rb, line 9
def checker
  @checker ||= IpChecker.new(IpsRetriever.new.office_ips)
end