Class: RightAws::S3Interface::S3ListBucketParser
- Inherits:
-
RightAWSParser
- Object
- RightAWSParser
- RightAws::S3Interface::S3ListBucketParser
- Defined in:
- lib/s3/right_s3_interface.rb
Overview
:nodoc:
Constant Summary
Constants inherited from RightAWSParser
RightAWSParser::DEFAULT_XML_LIBRARY
Instance Attribute Summary
Attributes inherited from RightAWSParser
#full_tag_name, #result, #tag, #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
#reset ⇒ Object
1228 1229 1230 1231 1232 |
# File 'lib/s3/right_s3_interface.rb', line 1228 def reset @result = [] @service = {} @current_key = {} end |
#tagend(name) ⇒ Object
1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 |
# File 'lib/s3/right_s3_interface.rb', line 1236 def tagend(name) case name # service info when 'Name' then @service['name'] = @text when 'Prefix' then @service['prefix'] = @text when 'Marker' then @service['marker'] = @text when 'MaxKeys' then @service['max-keys'] = @text when 'Delimiter' then @service['delimiter'] = @text when 'IsTruncated' then @service['is_truncated'] = (@text =~ /false/ ? false : true) # key data when 'Key' then @current_key[:key] = @text when 'LastModified'then @current_key[:last_modified] = @text when 'ETag' then @current_key[:e_tag] = @text when 'Size' then @current_key[:size] = @text.to_i when 'StorageClass'then @current_key[:storage_class] = @text when 'ID' then @current_key[:owner_id] = @text when 'DisplayName' then @current_key[:owner_display_name] = @text when 'Contents' @current_key[:service] = @service @result << @current_key end end |
#tagstart(name, attributes) ⇒ Object
1233 1234 1235 |
# File 'lib/s3/right_s3_interface.rb', line 1233 def (name, attributes) @current_key = {} if name == 'Contents' end |