Method: LHS::Record::Endpoints::ClassMethods#for_url

Defined in:
lib/lhs/concerns/record/endpoints.rb

#for_url(url) ⇒ Object



27
28
29
30
31
32
33
# File 'lib/lhs/concerns/record/endpoints.rb', line 27

def for_url(url)
  return unless url
  _template, record = LHS::Record::Endpoints.all.detect do |template, _|
    LHC::Endpoint.match?(url, template)
  end
  record
end