lib/heirloom/aws/simpledb.rb in heirloom-0.1.4 vs lib/heirloom/aws/simpledb.rb in heirloom-0.2.0

- old
+ new

@@ -13,11 +13,15 @@ def domains @sdb.list_domains.body['Domains'] end + def domain_exists?(domain) + domains.include? domain + end + def create_domain(domain) - @sdb.create_domain(domain) unless domains.include? domain + @sdb.create_domain(domain) unless domain_exists?(domain) end def put_attributes(domain, key, attributes, options = {}) @sdb.put_attributes domain, key, attributes, options end