Class: Fog::Parsers::AWS::CDN::GetInvalidationList

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

Instance Method Summary collapse

Instance Method Details

#end_element(name) ⇒ Object



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

def end_element(name)
  case name
  when 'InvalidationSummary'
    @response['InvalidationSummary'] << @invalidation_summary
    @invalidation_summary = {}
  when 'Id', 'Status'
    @invalidation_summary[name] = @value
  when 'IsTruncated'
    if @value == 'true'
      @response[name] = true
    else
      @response[name] = false
    end
  when 'Marker', 'NextMarker'
    @response[name] = @value
  when 'MaxItems'
    @response[name] = @value.to_i
  end
end

#resetObject



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

def reset
  @invalidation_summary = { }
  @response = { 'InvalidationSummary' => [] }
end

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



11
12
13
# File 'lib/fog/aws/parsers/cdn/get_invalidation_list.rb', line 11

def start_element(name, attrs = [])
  super
end