Class: S3::ListAllMyBucketsParser
- Inherits:
-
Object
- Object
- S3::ListAllMyBucketsParser
- Defined in:
- lib/S3.rb
Instance Attribute Summary collapse
-
#entries ⇒ Object
readonly
Returns the value of attribute entries.
Instance Method Summary collapse
-
#initialize ⇒ ListAllMyBucketsParser
constructor
A new instance of ListAllMyBucketsParser.
-
#reset ⇒ Object
get ready for another parse.
-
#tag_end(name) ⇒ Object
we have one, add him to the entries list.
- #tag_start(name, attributes) ⇒ Object
- #text(text) ⇒ Object
- #xmldecl(version, encoding, standalone) ⇒ Object
Constructor Details
#initialize ⇒ ListAllMyBucketsParser
Returns a new instance of ListAllMyBucketsParser.
646 647 648 |
# File 'lib/S3.rb', line 646 def initialize reset end |
Instance Attribute Details
#entries ⇒ Object (readonly)
Returns the value of attribute entries.
644 645 646 |
# File 'lib/S3.rb', line 644 def entries @entries end |
Instance Method Details
#reset ⇒ Object
get ready for another parse
678 679 680 681 682 683 |
# File 'lib/S3.rb', line 678 def reset @entries = [] @owner = nil @curr_bucket = nil @curr_text = '' end |
#tag_end(name) ⇒ Object
we have one, add him to the entries list
657 658 659 660 661 662 663 664 665 666 667 |
# File 'lib/S3.rb', line 657 def tag_end(name) text = @curr_text.strip if name == 'Bucket' @entries << @curr_bucket elsif name == 'Name' @curr_bucket.name = text elsif name == 'CreationDate' @curr_bucket.creation_date = text end @curr_text = '' end |
#tag_start(name, attributes) ⇒ Object
650 651 652 653 654 |
# File 'lib/S3.rb', line 650 def tag_start(name, attributes) if name == 'Bucket' @curr_bucket = Bucket.new end end |
#text(text) ⇒ Object
669 670 671 |
# File 'lib/S3.rb', line 669 def text(text) @curr_text += text end |
#xmldecl(version, encoding, standalone) ⇒ Object
673 674 675 |
# File 'lib/S3.rb', line 673 def xmldecl(version, encoding, standalone) # ignore end |