Class: Aws::Ec2::QEc2VpcsParser

Inherits:
AwsParser show all
Defined in:
lib/ec2/ec2.rb

Overview


PARSERS: Vpc

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 = {}) ⇒ QEc2VpcsParser

:nodoc:



2416
2417
2418
2419
# File 'lib/ec2/ec2.rb', line 2416

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



2440
2441
2442
# File 'lib/ec2/ec2.rb', line 2440

def reset
  @result = []
end

#tagend(name) ⇒ Object



2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
# File 'lib/ec2/ec2.rb', line 2425

def tagend(name)
  case name
    when 'vpcId' then
      @vpc[:vpc_id] = @text
    when 'state' then
      @vpc[:state] = @text
    when 'cidrBlock' then
      @vpc[:cidr_block] = @text
    when 'dhcpOptionsId' then
      @vpc[:dhcp_options_id] = @text
    when @wrapper
      @result << @vpc
  end
end

#tagstart(name, attribute) ⇒ Object



2421
2422
2423
# File 'lib/ec2/ec2.rb', line 2421

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