Class: Fog::Parsers::AWS::AutoScaling::DescribeTags

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

Instance Attribute Summary

Attributes inherited from Base

#response

Instance Method Summary collapse

Methods inherited from Base

#attr_value, #characters, #end_element_namespace, #initialize, #start_element, #start_element_namespace, #value

Constructor Details

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

Instance Method Details

#end_element(name) ⇒ Object



18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# File 'lib/fog/aws/parsers/auto_scaling/describe_tags.rb', line 18

def end_element(name)
  case name
  when 'member'
    @results['Tags'] << @tag
    reset_tag

  when 'Key', 'ResourceId', 'ResourceType', 'Value'
    @tag[name] = value
  when 'PropagateAtLaunch'
    @tag[name] = (value == 'true')

  when 'NextToken'
    @results[name] = value

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

  when 'DescribeTagsResponse'
    @response['DescribeTagsResult'] = @results

  end
end

#resetObject



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

def reset
  reset_tag
  @results = { 'Tags' => [] }
  @response = { 'DescribeTagsResult' => {}, 'ResponseMetadata' => {} }
end

#reset_tagObject



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

def reset_tag
  @tag = {}
end