Class: S3::Concerns::BucketsResult
- Inherits:
-
Driver::Model
- Object
- Driver::Model
- S3::Concerns::BucketsResult
- Defined in:
- lib/s3/client/model/concerns/buckets_result.rb
Instance Method Summary collapse
- #buckets ⇒ Object
-
#initialize(xml_doc) ⇒ BucketsResult
constructor
A new instance of BucketsResult.
- #owner_display_name ⇒ Object
- #owner_id ⇒ Object
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
#buckets ⇒ Object
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_name ⇒ Object
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_id ⇒ Object
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 |