Class: RightAws::S3Interface::S3ListAllMyBucketsParser

Inherits:
RightAWSParser 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

#result, #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:



728
729
730
731
# File 'lib/s3/right_s3_interface.rb', line 728

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

#tagend(name) ⇒ Object



735
736
737
738
739
740
741
742
743
# File 'lib/s3/right_s3_interface.rb', line 735

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



732
733
734
# File 'lib/s3/right_s3_interface.rb', line 732

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