Class: S3::ListBucketResponse

Inherits:
Response
  • Object
show all
Defined in:
lib/s3-ruby.rb

Instance Attribute Summary collapse

Attributes inherited from Response

#http_response

Instance Method Summary collapse

Constructor Details

#initialize(response) ⇒ ListBucketResponse

Returns a new instance of ListBucketResponse.



634
635
636
637
638
639
640
641
642
643
644
645
# File 'lib/s3-ruby.rb', line 634

def initialize(response)
  super(response)
  if response.is_a? Net::HTTPSuccess
    parser = ListBucketParser.new
    REXML::Document.parse_stream(response.body, parser)
    @properties = parser.properties
    @entries = parser.entries
    @common_prefix_entries = parser.common_prefixes
  else
    @entries = []
  end
end

Instance Attribute Details

#common_prefix_entriesObject (readonly)

Returns the value of attribute common_prefix_entries.



632
633
634
# File 'lib/s3-ruby.rb', line 632

def common_prefix_entries
  @common_prefix_entries
end

#entriesObject (readonly)

Returns the value of attribute entries.



631
632
633
# File 'lib/s3-ruby.rb', line 631

def entries
  @entries
end

#propertiesObject (readonly)

Returns the value of attribute properties.



630
631
632
# File 'lib/s3-ruby.rb', line 630

def properties
  @properties
end