Class: StaticRails::MatchesRequestToStaticSite

Inherits:
Object
  • Object
show all
Defined in:
lib/static-rails/matches_request_to_static_site.rb

Instance Method Summary collapse

Instance Method Details

#call(request) ⇒ Object



3
4
5
6
7
# File 'lib/static-rails/matches_request_to_static_site.rb', line 3

def call(request)
  StaticRails.config.sites.find { |site|
    subdomain_match?(site, request) && path_match?(site, request) && !skip_path?(site, request)
  }
end