Sha256: 57a8277386ab8a4e47b14ef49b56ab53b5206a21164dc65378b5a9a3dae5e668

Contents?: true

Size: 400 Bytes

Versions: 1

Compression:

Stored size: 400 Bytes

Contents

module Heirloom

  class ArtifactReader

    def initialize(args)
      @config = args[:config]
    end

    def show(args)
      domain = args[:name]
      id = args[:id]
      sdb.select "select * from #{domain} where itemName() = '#{id}'"
    end

    def exists?(args)
      show(args).any?
    end

    private

    def sdb
      @sdb ||= AWS::SimpleDB.new :config => @config
    end

  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
heirloom-0.1.0 lib/heirloom/artifact/artifact_reader.rb