Class: Fog::Parsers::Compute::AWS::DescribeAvailabilityZones

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

Instance Method Summary collapse

Instance Method Details

#end_element(name) ⇒ Object



19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# File 'lib/fog/aws/parsers/compute/describe_availability_zones.rb', line 19

def end_element(name)
  case name
  when 'item'
    unless @in_message_set
      @response['availabilityZoneInfo'] << @availability_zone
      @availability_zone = { 'messageSet' => [] }
    end
  when 'message'
    @availability_zone['messageSet'] << value
  when 'regionName', 'zoneName', 'zoneState'
    @availability_zone[name] = value
  when 'requestId'
    @response[name] = value
  when 'messageSet'
    @in_message_set = false
  end
end

#resetObject



14
15
16
17
# File 'lib/fog/aws/parsers/compute/describe_availability_zones.rb', line 14

def reset
  @availability_zone = { 'messageSet' => [] }
  @response = { 'availabilityZoneInfo' => [] }
end

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



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

def start_element(name, attrs = [])
  case name
  when 'messageSet'
    @in_message_set = true
  end
  super
end