Class: S3::ListAllMyBucketsParser
- Inherits:
-
Object
- Object
- S3::ListAllMyBucketsParser
- Defined in:
- lib/s3sync/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.
608 609 610 |
# File 'lib/s3sync/S3.rb', line 608 def initialize reset end |
Instance Attribute Details
#entries ⇒ Object (readonly)
Returns the value of attribute entries.
606 607 608 |
# File 'lib/s3sync/S3.rb', line 606 def entries @entries end |
Instance Method Details
#reset ⇒ Object
get ready for another parse
639 640 641 642 643 644 |
# File 'lib/s3sync/S3.rb', line 639 def reset @entries = [] @owner = nil @curr_bucket = nil @curr_text = '' end |
#tag_end(name) ⇒ Object
we have one, add him to the entries list
619 620 621 622 623 624 625 626 627 628 |
# File 'lib/s3sync/S3.rb', line 619 def tag_end(name) if name == 'Bucket' @entries << @curr_bucket elsif name == 'Name' @curr_bucket.name = @curr_text elsif name == 'CreationDate' @curr_bucket.creation_date = @curr_text end @curr_text = '' end |
#tag_start(name, attributes) ⇒ Object
612 613 614 615 616 |
# File 'lib/s3sync/S3.rb', line 612 def tag_start(name, attributes) if name == 'Bucket' @curr_bucket = Bucket.new end end |
#text(text) ⇒ Object
630 631 632 |
# File 'lib/s3sync/S3.rb', line 630 def text(text) @curr_text += text end |
#xmldecl(version, encoding, standalone) ⇒ Object
634 635 636 |
# File 'lib/s3sync/S3.rb', line 634 def xmldecl(version, encoding, standalone) # ignore end |