lib/amazon_sdb/base.rb
##
# Retrieves a list of domains in your SDS database. Each entry is a Domain object. 
Retrieves a list of domains in your SDS database. Each entry is a Domain object.
Retrieves a list of domains in your SDS database . Each entry is a Domain object .
def domains
        domains = []
        nextToken = nil
        base_options = {:Action => 'ListDomains'}
        continue = true
        while continue
          options = base_options.dup
          options[:NextToken] = nextToken unless nextToken.nil?
          sdb_query(options) do |h|
            h.search('//DomainName').each {|e| domains << Domain.new(self, e.innerText)}
            mt = h.at('//NextToken')
            if mt
              nextToken = mt.innerText
            else
              continue = false
            end
          end
        end
        domains
      end
def domains domains = [ ] nextToken = nil base_options = { :Action => 'ListDomains' } continue = true while continue options = base_options . dup options [ :NextToken ] = nextToken unless nextToken . nil? sdb_query ( options ) do | h | h . search ( '//DomainName' ) . each { | e | domains << Domain . new ( self , e . innerText ) } mt = h . at ( '//NextToken' ) if mt nextToken = mt . innerText else continue = false end end end domains end
Retrieves a list of domains in your SDS database.
Retrieves a list of domains in your SDS database .