Sha256: 7df17f489f17a98b643fab21ec02e85958b08630b91cea101ecfa805b6f350b5

Contents?: true

Size: 426 Bytes

Versions: 2

Compression:

Stored size: 426 Bytes

Contents

module Heirloom

  class ArtifactReader

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

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

    def exists?(args)
      show(args) != nil
    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.1.2 lib/heirloom/artifact/artifact_reader.rb
heirloom-0.1.1 lib/heirloom/artifact/artifact_reader.rb