Class: Aws::Ec2::QEc2VpcsParser
- Inherits:
-
AwsParser
- Object
- AwsParser
- Aws::Ec2::QEc2VpcsParser
- Defined in:
- lib/deltacloud/drivers/ec2/aws_vpc_monkey_patch.rb
Overview
PARSERS: Vpc
Instance Method Summary collapse
-
#initialize(wrapper, opts = {}) ⇒ QEc2VpcsParser
constructor
:nodoc:.
- #reset ⇒ Object
- #tagend(name) ⇒ Object
- #tagstart(name, attribute) ⇒ Object
Constructor Details
#initialize(wrapper, opts = {}) ⇒ QEc2VpcsParser
:nodoc:
231 232 233 234 |
# File 'lib/deltacloud/drivers/ec2/aws_vpc_monkey_patch.rb', line 231 def initialize(wrapper, opts = {}) super(opts) @wrapper = wrapper end |
Instance Method Details
#reset ⇒ Object
255 256 257 |
# File 'lib/deltacloud/drivers/ec2/aws_vpc_monkey_patch.rb', line 255 def reset @result = [] end |
#tagend(name) ⇒ Object
240 241 242 243 244 245 246 247 248 249 250 251 252 253 |
# File 'lib/deltacloud/drivers/ec2/aws_vpc_monkey_patch.rb', line 240 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
236 237 238 |
# File 'lib/deltacloud/drivers/ec2/aws_vpc_monkey_patch.rb', line 236 def (name, attribute) @vpc = {} if name == @wrapper end |