Class: Stackster::EntryLister

Inherits:
Object
  • Object
show all
Defined in:
lib/stackster/entry/entry_lister.rb

Instance Method Summary collapse

Constructor Details

#initialize(args) ⇒ EntryLister

Returns a new instance of EntryLister.



4
5
6
7
# File 'lib/stackster/entry/entry_lister.rb', line 4

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

Instance Method Details

#allObject



9
10
11
12
13
14
15
16
17
# File 'lib/stackster/entry/entry_lister.rb', line 9

def all
  if sdb_connect.domain_exists? @domain
    e = sdb_connect.select "select * from #{@domain}"
    entries = e.keys.map do |name|
      remove_region_from_entry(name)
    end
  end
  entries ? entries : []
end