Class: SdbDal::S3::ListBucketResponse

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



566
567
568
569
570
571
572
573
574
575
576
577
# File 'lib/sdb_dal/s3.rb', line 566

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.



564
565
566
# File 'lib/sdb_dal/s3.rb', line 564

def common_prefix_entries
  @common_prefix_entries
end

#entriesObject (readonly)

Returns the value of attribute entries.



563
564
565
# File 'lib/sdb_dal/s3.rb', line 563

def entries
  @entries
end

#propertiesObject (readonly)

Returns the value of attribute properties.



562
563
564
# File 'lib/sdb_dal/s3.rb', line 562

def properties
  @properties
end