Sha256: 42b93725b2abacb0db86ac09ff7ea796c0372ce0e1feecc72d49f47776b3490a

Contents?: true

Size: 322 Bytes

Versions: 3

Compression:

Stored size: 322 Bytes

Contents

require 'addressable/uri'

module Leadlight
  class NullLink
    include Addressable
    attr_reader :href

    def initialize(href)
      @href = href
    end

    def ==(other)
      other.is_a?(self.class) &&
        href == other.href
    end

    def params
      URI.parse(href).query_values || {}
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
leadlight-0.1.0 lib/leadlight/null_link.rb
leadlight-0.0.7 lib/leadlight/null_link.rb
leadlight-0.0.6 lib/leadlight/null_link.rb