Class: RightAws::Ec2::QEc2RunInstancesParser
- Inherits:
-
RightAWSParser
- Object
- RightAWSParser
- RightAws::Ec2::QEc2RunInstancesParser
- Defined in:
- lib/ec2/right_ec2.rb
Instance Attribute Summary
Attributes inherited from RightAWSParser
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
1088 1089 1090 |
# File 'lib/ec2/right_ec2.rb', line 1088 def reset @result = [] end |
#tagend(name) ⇒ Object
1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 |
# File 'lib/ec2/right_ec2.rb', line 1068 def tagend(name) case name when 'reservationId' ; @reservation.reservationId = @text when 'ownerId' ; @reservation.ownerId = @text when 'groupId' ; @reservation.groupSet << @text when 'instanceId' ; @instance.instanceId = @text when 'imageId' ; @instance.imageId = @text when 'dnsName' ; @instance.dnsName = @text when 'privateDnsName'; @instance.privateDnsName = @text when 'reason' ; @instance.reason = @text when 'keyName' ; @instance.keyName = @text when 'amiLaunchIndex'; @instance.amiLaunchIndex = @text when 'code' ; @instance.instanceState.code = @text when 'name' ; @instance.instanceState.name = @text when 'item' @reservation.instancesSet << @instance if @xmlpath == 'RunInstancesResponse/instancesSet' when 'RunInstancesResponse'; @result << @reservation when 'productCode' ; (@instance.productCodes ||= []) << @text end end |
#tagstart(name, attributes) ⇒ Object
1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 |
# File 'lib/ec2/right_ec2.rb', line 1049 def (name, attributes) case name when 'RunInstancesResponse' @reservation = QEc2DescribeInstancesType.new @reservation.groupSet = [] @reservation.instancesSet = [] when 'item' if @xmlpath == 'RunInstancesResponse/instancesSet' @instance = QEc2RunningInstancesItemType.new # the optional params (sometimes are missing and we dont want them to be nil) @instance.reason = '' @instance.dnsName = '' @instance.privateDnsName = '' @instance.amiLaunchIndex = '' @instance.keyName = '' @instance.instanceState = QEc2InstanceStateType.new end end end |