Sha256: a20d7c3789deb9eccc772e9517c42137071d13c58ca04d92f132022fce626697

Contents?: true

Size: 605 Bytes

Versions: 13

Compression:

Stored size: 605 Bytes

Contents

require "crimp"

module Alephant
  module Lookup
    class LookupLocation
      attr_reader :component_id, :component_key, :opts, :opts_hash, :batch_version
      attr_accessor :location

      def initialize(component_id, opts, batch_version, location = nil)
        @component_id = component_id
        @batch_version = batch_version
        @opts = opts
        @opts_hash = hash_for(opts)
        @location = location
      end

      def component_key
        "#{component_id}/#{opts_hash}"
      end

      private

      def hash_for(opts)
        Crimp.signature opts
      end

    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
alephant-lookup-2.2.0 lib/alephant/lookup/lookup_location.rb
alephant-lookup-2.1.0 lib/alephant/lookup/lookup_location.rb
alephant-lookup-2.0.2 lib/alephant/lookup/lookup_location.rb
alephant-lookup-2.0.1 lib/alephant/lookup/lookup_location.rb
alephant-lookup-2.0.0 lib/alephant/lookup/lookup_location.rb
alephant-lookup-1.0.0 lib/alephant/lookup/lookup_location.rb
alephant-lookup-0.4.2 lib/alephant/lookup/lookup_location.rb
alephant-lookup-0.4.1 lib/alephant/lookup/lookup_location.rb
alephant-lookup-0.4.0 lib/alephant/lookup/lookup_location.rb
alephant-lookup-0.3.0 lib/alephant/lookup/lookup_location.rb
alephant-lookup-0.2.0 lib/alephant/lookup/lookup_location.rb
alephant-lookup-0.1.9 lib/alephant/lookup/lookup_location.rb
alephant-lookup-0.1.7 lib/alephant/lookup/lookup_location.rb