Class: Aws::Ec2::QEc2DescribeSecurityGroupsParser
- Defined in:
- lib/ec2/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
1524 1525 1526 |
# File 'lib/ec2/ec2.rb', line 1524 def reset @result = [] end |
#tagend(name) ⇒ Object
1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 |
# File 'lib/ec2/ec2.rb', line 1496 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 @sIpRange.cidrIp = @text when 'item' if @xmlpath=='DescribeSecurityGroupsResponse/securityGroupInfo/item/ipPermissions/item/groups' @perm.groups << @sgroup elsif @xmlpath=='DescribeSecurityGroupsResponse/securityGroupInfo/item/ipPermissions/item/ipRanges' @perm.ipRanges << @sIpRange elsif @xmlpath=='DescribeSecurityGroupsResponse/securityGroupInfo/item/ipPermissions' @group.ipPermissions << @perm elsif @xmlpath=='DescribeSecurityGroupsResponse/securityGroupInfo' @result << @group end end end |
#tagstart(name, attributes) ⇒ Object
1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 |
# File 'lib/ec2/ec2.rb', line 1478 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 elsif @xmlpath=='DescribeSecurityGroupsResponse/securityGroupInfo/item/ipPermissions/item/ipRanges' @sIpRange = QEc2IpRangeItemType.new end end end |