Class: Aws::S3Interface::S3AclParser

Inherits:
AwsParser
  • Object
show all
Defined in:
lib/s3/s3_interface.rb

Overview

:nodoc:

Constant Summary

Constants inherited from AwsParser

AwsParser::DEFAULT_XML_LIBRARY

Instance Attribute Summary

Attributes inherited from AwsParser

#result, #xml_lib, #xmlpath

Instance Method Summary collapse

Methods inherited from AwsParser

#initialize, #method_missing, #parse, #tag_end, #tag_start, #tagtext, #text, xml_lib, xml_lib=

Constructor Details

This class inherits a constructor from Aws::AwsParser

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Aws::AwsParser

Instance Method Details

#resetObject



1280
1281
1282
1283
# File 'lib/s3/s3_interface.rb', line 1280

def reset
  @result          = {:grantees=>[], :owner=>{}}
  @current_grantee = {}
end

#tagend(name) ⇒ Object



1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
# File 'lib/s3/s3_interface.rb', line 1289

def tagend(name)
  case name
    # service info
    when 'ID'
      if @xmlpath == 'AccessControlPolicy/Owner'
        @result[:owner][:id] = @text
      else
        @current_grantee[:id] = @text
      end
    when 'DisplayName'
      if @xmlpath == 'AccessControlPolicy/Owner'
        @result[:owner][:display_name] = @text
      else
        @current_grantee[:display_name] = @text
      end
    when 'URI'
      @current_grantee[:uri] = @text
    when 'Permission'
      @current_grantee[:permissions] = @text
    when 'Grant'
      @result[:grantees] << @current_grantee
  end
end

#tagstart(name, attributes) ⇒ Object



1285
1286
1287
# File 'lib/s3/s3_interface.rb', line 1285

def tagstart(name, attributes)
  @current_grantee = {:attributes => attributes} if name=='Grantee'
end