Class: Fog::Parsers::AWS::Compute::DescribeVpcAttribute

Inherits:
Base
  • Object
show all
Defined in:
lib/fog/aws/parsers/compute/describe_vpc_attribute.rb

Instance Method Summary collapse

Instance Method Details

#end_element(name) ⇒ Object



22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
# File 'lib/fog/aws/parsers/compute/describe_vpc_attribute.rb', line 22

def end_element(name)
  if @in_enable_dns_support
    case name
    when 'value'
      @response['enableDnsSupport'] = (value == 'true')
    when 'enableDnsSupport'
      @in_enable_dns_support = false
    end
  elsif @in_enable_dns_hostnames
    case name
    when 'value'
      @response['enableDnsHostnames'] = (value == 'true')
    when 'enableDnsHostnames'
      @in_enable_dns_hostnames = false
    end
  else
    case name
    when 'requestId', 'vpcId'
      @response[name] = value
    end
  end
end

#resetObject



6
7
8
9
10
# File 'lib/fog/aws/parsers/compute/describe_vpc_attribute.rb', line 6

def reset
  @response                = { }
  @in_enable_dns_support   = false
  @in_enable_dns_hostnames = false
end

#start_element(name, attrs = []) ⇒ Object



12
13
14
15
16
17
18
19
20
# File 'lib/fog/aws/parsers/compute/describe_vpc_attribute.rb', line 12

def start_element(name, attrs = [])
  super
  case name
  when 'enableDnsSupport'
    @in_enable_dns_support   = true
  when 'enableDnsHostnames'
    @in_enable_dns_hostnames = true
  end
end