Sha256: adf7e92e310b2532ffe7365c9706b197eee256c014c9850d99f1543250c9cdaa

Contents?: true

Size: 397 Bytes

Versions: 2

Compression:

Stored size: 397 Bytes

Contents

module Heirloom

  class ArtifactReader

    def initialize(args)
      @config = Config.new
    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

2 entries across 2 versions & 1 rubygems

Version Path
heirloom-0.0.9 lib/heirloom/artifact/artifact_reader.rb
heirloom-0.0.8 lib/heirloom/artifact/artifact_reader.rb