Class: RightAws::S3Interface::S3ListAllMyBucketsParser

Inherits:
RightAWSParser
  • Object
show all
Defined in:
lib/s3/right_s3_interface.rb

Overview


PARSERS:

Constant Summary

Constants inherited from RightAWSParser

RightAWSParser::DEFAULT_XML_LIBRARY

Instance Attribute Summary

Attributes inherited from RightAWSParser

#full_tag_name, #result, #tag, #xml_lib, #xmlpath

Instance Method Summary collapse

Methods inherited from RightAWSParser

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

Constructor Details

This class inherits a constructor from RightAws::RightAWSParser

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class RightAws::RightAWSParser

Instance Method Details

#resetObject

:nodoc:



1023
1024
1025
1026
# File 'lib/s3/right_s3_interface.rb', line 1023

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

#tagend(name) ⇒ Object



1030
1031
1032
1033
1034
1035
1036
1037
1038
# File 'lib/s3/right_s3_interface.rb', line 1030

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

#tagstart(name, attributes) ⇒ Object



1027
1028
1029
# File 'lib/s3/right_s3_interface.rb', line 1027

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