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

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

Instance Attribute Summary

Attributes inherited from Base

#response

Instance Method Summary collapse

Methods inherited from Base

#attr_value, #characters, #initialize, #value

Constructor Details

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

Instance Method Details

#end_element(name) ⇒ Object



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

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



8
9
10
11
# File 'lib/rackspace-fog/aws/parsers/cdn/get_invalidation_list.rb', line 8

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

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



13
14
15
# File 'lib/rackspace-fog/aws/parsers/cdn/get_invalidation_list.rb', line 13

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