Class: Fog::Parsers::AWS::AutoScaling::DescribeAdjustmentTypes

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

Instance Attribute Summary

Attributes inherited from Base

#response

Instance Method Summary collapse

Methods inherited from Base

#attr_value, #characters, #initialize, #value

Constructor Details

This class inherits a constructor from Fog::Parsers::Base

Instance Method Details

#end_element(name) ⇒ Object



26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
# File 'lib/fog/aws/parsers/auto_scaling/describe_adjustment_types.rb', line 26

def end_element(name)
  case name
  when 'member'
    if @in_adjustment_types
      @results['AdjustmentTypes'] << @adjustment_type
      reset_adjustment_type
    end

  when 'AdjustmentType'
    @adjustment_type[name] = value

  when 'AdjustmentTypes'
    @in_adjustment_types = false

  when 'RequestId'
    @response['ResponseMetadata'][name] = value

  when 'DescribeAdjustmentTypesResponse'
    @response['DescribeAdjustmentTypesResult'] = @results
  end
end

#resetObject



8
9
10
11
12
# File 'lib/fog/aws/parsers/auto_scaling/describe_adjustment_types.rb', line 8

def reset
  reset_adjustment_type
  @results = { 'AdjustmentTypes' => [] }
  @response = { 'DescribeAdjustmentTypesResult' => {}, 'ResponseMetadata' => {} }
end

#reset_adjustment_typeObject



14
15
16
# File 'lib/fog/aws/parsers/auto_scaling/describe_adjustment_types.rb', line 14

def reset_adjustment_type
  @adjustment_type = {}
end

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



18
19
20
21
22
23
24
# File 'lib/fog/aws/parsers/auto_scaling/describe_adjustment_types.rb', line 18

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