Class: S3::ListAllMyBucketsParser
- Inherits:
-
Object
- Object
- S3::ListAllMyBucketsParser
- Defined in:
- lib/s3-ruby.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.
562 563 564 |
# File 'lib/s3-ruby.rb', line 562 def initialize reset end |
Instance Attribute Details
#entries ⇒ Object (readonly)
Returns the value of attribute entries.
560 561 562 |
# File 'lib/s3-ruby.rb', line 560 def entries @entries end |
Instance Method Details
#reset ⇒ Object
get ready for another parse
593 594 595 596 597 598 |
# File 'lib/s3-ruby.rb', line 593 def reset @entries = [] @owner = nil @curr_bucket = nil @curr_text = '' end |
#tag_end(name) ⇒ Object
we have one, add him to the entries list
573 574 575 576 577 578 579 580 581 582 |
# File 'lib/s3-ruby.rb', line 573 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
566 567 568 569 570 |
# File 'lib/s3-ruby.rb', line 566 def tag_start(name, attributes) if name == 'Bucket' @curr_bucket = Bucket.new end end |
#text(text) ⇒ Object
584 585 586 |
# File 'lib/s3-ruby.rb', line 584 def text(text) @curr_text += text end |
#xmldecl(version, encoding, standalone) ⇒ Object
588 589 590 |
# File 'lib/s3-ruby.rb', line 588 def xmldecl(version, encoding, standalone) # ignore end |