Sha256: 2a8b6f9b7c01a50b89246de7457dc8d75d7d7cfff219236014b89a030045a03d

Contents?: true

Size: 339 Bytes

Versions: 12

Compression:

Stored size: 339 Bytes

Contents

# frozen_string_literal: true

# An endpoint is used as source to fetch objects
class DHS::Endpoint

  def self.for_url(url)
    template, record = DHS::Record::Endpoints.all.dup.detect do |template, _record|
      DHC::Endpoint.match?(url, template)
    end
    record&.endpoints&.detect { |endpoint| endpoint.url == template }
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
dhs-1.6.0 lib/dhs/endpoint.rb
dhs-1.5.0 lib/dhs/endpoint.rb
dhs-1.4.2 lib/dhs/endpoint.rb
dhs-1.4.1 lib/dhs/endpoint.rb
dhs-1.4.0 lib/dhs/endpoint.rb
dhs-1.3.0 lib/dhs/endpoint.rb
dhs-1.2.0 lib/dhs/endpoint.rb
dhs-1.1.0 lib/dhs/endpoint.rb
dhs-1.0.3 lib/dhs/endpoint.rb
dhs-1.0.2 lib/dhs/endpoint.rb
dhs-1.0.1 lib/dhs/endpoint.rb
dhs-1.0.0 lib/dhs/endpoint.rb