Class: Fog::Parsers::AWS::AutoScaling::TerminateInstanceInAutoScalingGroup

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

Instance Method Summary collapse

Instance Method Details

#end_element(name) ⇒ Object



11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# File 'lib/fog/aws/parsers/auto_scaling/terminate_instance_in_auto_scaling_group.rb', line 11

def end_element(name)
  case name
  when 'ActivityId', 'AutoScalingGroupName', 'Cause',
       'Description', 'StatusCode', 'StatusMessage'
    @results['Activity'][name] = value
  when 'EndTime', 'StartTime'
    @results['Activity'][name] = Time.parse(value)
  when 'Progress'
    @results['Activity'][name] = value.to_i

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

  when 'TerminateInstanceInAutoScalingGroupResponse'
    @response['TerminateInstanceInAutoScalingGroupResult'] = @results
  end
end

#resetObject



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

def reset
  @results = { 'Activity' => {} }
  @response = { 'TerminateInstanceInAutoScalingGroupResult' => {}, 'ResponseMetadata' => {} }
end