Class: Fog::Parsers::AWS::Compute::DescribeVolumesModifications

Inherits:
Base
  • Object
show all
Defined in:
lib/fog/aws/parsers/compute/describe_volumes_modifications.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
# File 'lib/fog/aws/parsers/compute/describe_volumes_modifications.rb', line 11

def end_element(name)
  case name
  when 'modificationState', 'originalVolumeType', 'statusMessage', 'targetVolumeType', 'volumeId'
    @modification[name] = value
  when 'startTime', 'endTime'
    @modification[name] = Time.parse(value)
  when 'originalIops', 'originalSize', 'progress', 'targetIops', 'targetSize'
    @modification[name] = value.to_i
  when 'requestId'
    @response[name] = value
  when 'item'
    @response['volumeModificationSet'] << @modification.dup
    @modification = {}
  end
end

#resetObject



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

def reset
  @response     = { 'volumeModificationSet' => [] }
  @modification = {}
end