Class: RightAws::S3Interface::S3ListBucketParser
- Inherits:
-
RightAWSParser
- Object
- RightAWSParser
- RightAws::S3Interface::S3ListBucketParser
- Defined in:
- lib/s3/right_s3_interface.rb
Overview
:nodoc:
Instance Attribute Summary
Attributes inherited from RightAWSParser
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
#reset ⇒ Object
633 634 635 636 637 |
# File 'lib/s3/right_s3_interface.rb', line 633 def reset @result = [] @service = {} @current_key = {} end |
#tagend(name) ⇒ Object
641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 |
# File 'lib/s3/right_s3_interface.rb', line 641 def tagend(name) case name # service info when 'Name' ; @service['name'] = @text when 'Prefix' ; @service['prefix'] = @text when 'Marker' ; @service['marker'] = @text when 'MaxKeys' ; @service['max-keys'] = @text when 'Delimiter' ; @service['delimiter'] = @text when 'IsTruncated' ; @service['is_truncated'] = (@text =~ /false/ ? false : true) # key data when 'Key' ; @current_key[:key] = @text when 'LastModified'; @current_key[:last_modified] = @text when 'ETag' ; @current_key[:e_tag] = @text when 'Size' ; @current_key[:size] = @text.to_i when 'StorageClass'; @current_key[:storage_class] = @text when 'ID' ; @current_key[:owner_id] = @text when 'DisplayName' ; @current_key[:owner_display_name] = @text when 'Contents' ; @current_key[:service] = @service; @result << @current_key end end |
#tagstart(name, attributes) ⇒ Object
638 639 640 |
# File 'lib/s3/right_s3_interface.rb', line 638 def (name, attributes) @current_key = {} if name == 'Contents' end |