Class: S3Lib::Service

Inherits:
Object
  • Object
show all
Defined in:
lib/service.rb,
lib/service_dev.rb

Class Method Summary collapse

Class Method Details

.bucketsObject



9
10
11
12
13
14
15
16
# File 'lib/service.rb', line 9

def self.buckets
  response = S3Lib.request(:get, '')
  doc = REXML::Document.new(response)
  xml = doc.root
  REXML::XPath.match(xml, '//Buckets/Bucket').collect do |bucket_xml|
    Bucket.new(bucket_xml)
  end
end