Class: Fog::Parsers::AWS::AutoScaling::DescribeAutoScalingInstances

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

Instance Method Summary collapse

Instance Method Details

#end_element(name) ⇒ Object



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

def end_element(name)
  case name
  when 'member'
    @results['AutoScalingInstances'] << @auto_scaling_instance
    reset_auto_scaling_instance

  when 'AutoScalingGroupName', 'AvailabilityZone', 'HealthStatus',
       'InstanceId', 'LaunchConfigurationName', 'LifecycleState'
    @auto_scaling_instance[name] = value

  when 'NextToken'
    @results[name] = value

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

  when 'DescribeAutoScalingInstancesResponse'
    @response['DescribeAutoScalingInstancesResult'] = @results
  end
end

#resetObject



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

def reset
  reset_auto_scaling_instance
  @results = { 'AutoScalingInstances' => [] }
  @response = { 'DescribeAutoScalingInstancesResult' => {}, 'ResponseMetadata' => {} }
end

#reset_auto_scaling_instanceObject



12
13
14
# File 'lib/fog/aws/parsers/auto_scaling/describe_auto_scaling_instances.rb', line 12

def reset_auto_scaling_instance
  @auto_scaling_instance = {}
end