Class: S3::ListBucketResponse

Inherits:
Response
  • Object
show all
Defined in:
lib/s3sync/S3.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.



687
688
689
690
691
692
693
694
695
696
697
698
# File 'lib/s3sync/S3.rb', line 687

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.



685
686
687
# File 'lib/s3sync/S3.rb', line 685

def common_prefix_entries
  @common_prefix_entries
end

#entriesObject (readonly)

Returns the value of attribute entries.



684
685
686
# File 'lib/s3sync/S3.rb', line 684

def entries
  @entries
end

#propertiesObject (readonly)

Returns the value of attribute properties.



683
684
685
# File 'lib/s3sync/S3.rb', line 683

def properties
  @properties
end