Class: Aws::S3Interface::S3ListAllMyBucketsParser

Inherits:
AwsParser
  • Object
show all
Defined in:
lib/s3/s3_interface.rb

Overview


PARSERS:

Constant Summary

Constants inherited from AwsParser

AwsParser::DEFAULT_XML_LIBRARY

Instance Attribute Summary

Attributes inherited from AwsParser

#result, #xml_lib, #xmlpath

Instance Method Summary collapse

Methods inherited from AwsParser

#initialize, #method_missing, #parse, #tag_end, #tag_start, #tagtext, #text, xml_lib, xml_lib=

Constructor Details

This class inherits a constructor from Aws::AwsParser

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Aws::AwsParser

Instance Method Details

#resetObject

:nodoc:



1137
1138
1139
1140
# File 'lib/s3/s3_interface.rb', line 1137

def reset
  @result = []
  @owner  = {}
end

#tagend(name) ⇒ Object



1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
# File 'lib/s3/s3_interface.rb', line 1146

def tagend(name)
  case name
    when 'ID';
      @owner[:owner_id] = @text
    when 'DisplayName';
      @owner[:owner_display_name] = @text
    when 'Name';
      @current_bucket[:name] = @text
    when 'CreationDate';
      @current_bucket[:creation_date] = @text
    when 'Bucket';
      @result << @current_bucket.merge(@owner)
  end
end

#tagstart(name, attributes) ⇒ Object



1142
1143
1144
# File 'lib/s3/s3_interface.rb', line 1142

def tagstart(name, attributes)
  @current_bucket = {} if name == 'Bucket'
end