Class: S3::Concerns::BucketsResult

Inherits:
Driver::Model
  • Object
show all
Defined in:
lib/s3/client/model/concerns/buckets_result.rb

Instance Method Summary collapse

Constructor Details

#initialize(xml_doc) ⇒ BucketsResult

Returns a new instance of BucketsResult.



4
5
6
# File 'lib/s3/client/model/concerns/buckets_result.rb', line 4

def initialize(xml_doc)
  @xml_doc = xml_doc
end

Instance Method Details

#bucketsObject



8
9
10
# File 'lib/s3/client/model/concerns/buckets_result.rb', line 8

def buckets
  REXML::XPath.match(@xml_doc, "/ListAllMyBucketsResult/Buckets/Bucket/Name").map { |b| b.text }
end

#owner_display_nameObject



16
17
18
# File 'lib/s3/client/model/concerns/buckets_result.rb', line 16

def owner_display_name
  REXML::XPath.match(@xml_doc, "/ListAllMyBucketsResult/Owner/DisplayName").map { |b| b.text }.first
end

#owner_idObject



12
13
14
# File 'lib/s3/client/model/concerns/buckets_result.rb', line 12

def owner_id
  REXML::XPath.match(@xml_doc, "/ListAllMyBucketsResult/Owner/ID").map { |b| b.text }.first
end