Class: Aws::Ec2::QEc2DescribeSecurityGroupsParser
- Defined in:
- lib/ec2/right_ec2.rb
Overview
:nodoc:
Constant Summary
Constants inherited from AwsParser
AwsParser::DEFAULT_XML_LIBRARY
Instance Attribute Summary
Attributes inherited from AwsParser
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
#reset ⇒ Object
1345 1346 1347 |
# File 'lib/ec2/right_ec2.rb', line 1345 def reset @result = [] end |
#tagend(name) ⇒ Object
1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 |
# File 'lib/ec2/right_ec2.rb', line 1320 def tagend(name) case name when 'ownerId' then @group.ownerId = @text when 'groupDescription' then @group.groupDescription = @text when 'groupName' if @xmlpath=='DescribeSecurityGroupsResponse/securityGroupInfo/item' @group.groupName = @text elsif @xmlpath=='DescribeSecurityGroupsResponse/securityGroupInfo/item/ipPermissions/item/groups/item' @sgroup.groupName = @text end when 'ipProtocol' then @perm.ipProtocol = @text when 'fromPort' then @perm.fromPort = @text when 'toPort' then @perm.toPort = @text when 'userId' then @sgroup.userId = @text when 'cidrIp' then @perm.ipRanges << @text when 'item' if @xmlpath=='DescribeSecurityGroupsResponse/securityGroupInfo/item/ipPermissions/item/groups' @perm.groups << @sgroup elsif @xmlpath=='DescribeSecurityGroupsResponse/securityGroupInfo/item/ipPermissions' @group.ipPermissions << @perm elsif @xmlpath=='DescribeSecurityGroupsResponse/securityGroupInfo' @result << @group end end end |
#tagstart(name, attributes) ⇒ Object
1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 |
# File 'lib/ec2/right_ec2.rb', line 1305 def (name, attributes) case name when 'item' if @xmlpath=='DescribeSecurityGroupsResponse/securityGroupInfo' @group = QEc2SecurityGroupItemType.new @group.ipPermissions = [] elsif @xmlpath=='DescribeSecurityGroupsResponse/securityGroupInfo/item/ipPermissions' @perm = QEc2IpPermissionType.new @perm.ipRanges = [] @perm.groups = [] elsif @xmlpath=='DescribeSecurityGroupsResponse/securityGroupInfo/item/ipPermissions/item/groups' @sgroup = QEc2UserIdGroupPairType.new end end end |