Sha256: f14fcab122baa015585d04bd49a7ce5fcd513700eda204cd0f08738da686c332

Contents?: true

Size: 598 Bytes

Versions: 4

Compression:

Stored size: 598 Bytes

Contents

require 'crimp'
require 'alephant/lookup/lookup_location'

module Alephant
  module Lookup
    class LookupQuery < LookupLocation
      attr_reader :opts_hash
      attr_writer :location

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

      def to_h
        {
          :component_id => @component_id,
          :opts_hash => @opts_hash,
          S3_LOCATION_FIELD => @location
        }
      end

      private

      def hash_for(opts)
        Crimp.signature opts
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
alephant-lookup-0.1.2 lib/alephant/lookup/lookup_query.rb
alephant-lookup-0.1.1 lib/alephant/lookup/lookup_query.rb
alephant-lookup-0.1.0 lib/alephant/lookup/lookup_query.rb
alephant-lookup-0.0.4 lib/alephant/lookup/lookup_query.rb