Sha256: 8bdde6df9b3819f6f9565a02da7ae5d39b72467011d408d69805c1db1710e9b1

Contents?: true

Size: 455 Bytes

Versions: 12

Compression:

Stored size: 455 Bytes

Contents

# frozen_string_literal: true

require 'active_support'

class DHS::Proxy

  module Link
    extend ActiveSupport::Concern

    private

    def record_from_link
      DHS::Record.for_url(_data.href)
    end

    def endpoint_from_link
      DHS::Endpoint.for_url(_data.href)
    end

    def params_from_link
      return {} if !_data.href || !endpoint_from_link
      DHC::Endpoint.values_as_params(endpoint_from_link.url, _data.href)
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

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