class LHS::Endpoint

An endpoint is used as source to fetch objects

Public Class Methods

for_url(url) click to toggle source
# File lib/lhs/endpoint.rb, line 6
def self.for_url(url)
  template, record = LHS::Record::Endpoints.all.dup.detect do |template, _record|
    LHC::Endpoint.match?(url, template)
  end
  record&.endpoints&.detect { |endpoint| endpoint.url == template }
end