Sha256: 3deec117f64b7fb4320de7183b6e7b5558e36f330cf5c2dc129fbeac7551f23b

Contents?: true

Size: 400 Bytes

Versions: 4

Compression:

Stored size: 400 Bytes

Contents

module Heirloom

  class Lister

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

    def list(limit=10)
      sdb.select("select * from #{@name} where built_at > '2000-01-01T00:00:00.000Z'\
                  order by built_at desc limit #{limit}").keys
    end

    private

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

  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
heirloom-0.3.1 lib/heirloom/archive/lister.rb
heirloom-0.3.0 lib/heirloom/archive/lister.rb
heirloom-0.3.0.rc1 lib/heirloom/archive/lister.rb
heirloom-0.2.0 lib/heirloom/archive/lister.rb