Sha256: d3c2f207da807025cf23de88f13ab3185f7d27fb32e1b8eaf950d9a48d03c1a2

Contents?: true

Size: 455 Bytes

Versions: 3

Compression:

Stored size: 455 Bytes

Contents

# service.rb
require File.join(File.dirname(__FILE__), 's3_authenticator')
require 'rexml/document'

module S3Lib
  
  class Service
    
    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
        
  end
  
end

if __FILE__ == $0
  S3Lib::Service.buckets
end

Version data entries

3 entries across 3 versions & 2 rubygems

Version Path
spatten-s3lib-0.0.1 lib/service.rb
s3lib-0.1.1 lib/service.rb
s3lib-0.1.0 lib/service.rb