Class: Aws::Ec2::QEc2SubnetsParser

Inherits:
AwsParser
  • Object
show all
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

#result, #xml_lib, #xmlpath

Instance Method Summary collapse

Methods inherited from AwsParser

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

Constructor Details

#initialize(wrapper, opts = {}) ⇒ QEc2SubnetsParser

Returns a new instance of QEc2SubnetsParser.



2732
2733
2734
2735
# File 'lib/ec2/ec2.rb', line 2732

def initialize(wrapper, opts = {})
  super(opts)
  @wrapper = wrapper
end

Dynamic Method Handling

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

Instance Method Details

#resetObject



2760
2761
2762
# File 'lib/ec2/ec2.rb', line 2760

def reset
  @result = []
end

#tagend(name) ⇒ Object



2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
# File 'lib/ec2/ec2.rb', line 2741

def tagend(name)
  case name
    when 'subnetId' then
      @subnet[:subnet_id] = @text
    when 'state' then
      @subnet[:state] = @text
    when 'vpcId' then
      @subnet[:vpc_id] = @text
    when 'cidrBlock' then
      @subnet[:cidr_block] = @text
    when 'availableIpAddressCount' then
      @subnet[:available_ip_address_count] = @text
    when 'availabilityZone' then
      @subnet[:availability_zone] = @text
    when @wrapper
      @result << @subnet
  end
end

#tagstart(name, attribute) ⇒ Object



2737
2738
2739
# File 'lib/ec2/ec2.rb', line 2737

def tagstart(name, attribute)
  @subnet = {} if name == @wrapper
end