Class: Fog::Parsers::AWS::ECS::DescribeContainerInstances

Inherits:
ContainerInstance show all
Defined in:
lib/fog/aws/parsers/ecs/describe_container_instances.rb

Instance Method Summary collapse

Methods inherited from ContainerInstance

#start_element

Methods inherited from Base

#start_element

Instance Method Details

#end_element(name) ⇒ Object



23
24
25
26
27
28
29
30
31
32
33
# File 'lib/fog/aws/parsers/ecs/describe_container_instances.rb', line 23

def end_element(name)
  super
  case name
  when 'member'
    case @context.last
    when 'containerInstances'
      @response[@result]['containerInstances'] << @container_instance
      @container_instance = {}
    end
  end
end

#resetObject



8
9
10
11
12
13
14
15
16
17
18
19
20
21
# File 'lib/fog/aws/parsers/ecs/describe_container_instances.rb', line 8

def reset
  super
  @result = 'DescribeContainerInstancesResult'
  @response[@result] = {
    'containerInstances' => [],
    'failures' => []
  }
  @contexts = %w(containerInstances registeredResources remainingResources stringSetValue)
  @context = []
  @container_instance  = {}
  @registered_resource = {}
  @remaining_resource  = {}
  @string_set = []
end