Class: Fog::Parsers::AWS::RDS::SnapshotParser

Inherits:
Base
  • Object
show all
Defined in:
lib/rackspace-fog/aws/parsers/rds/snapshot_parser.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



21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# File 'lib/rackspace-fog/aws/parsers/rds/snapshot_parser.rb', line 21

def end_element(name)
  case name
  when 'AllocatedStorage' then @db_snapshot['AllocatedStorage'] = value.to_i
  when 'AvailabilityZone' then @db_snapshot['AvailabilityZone'] = value
  when 'DBInstanceIdentifier' then @db_snapshot['DBInstanceIdentifier'] = value
  when 'DBSnapshotIdentifier' then @db_snapshot['DBSnapshotIdentifier'] = value
  when 'Engine' then @db_snapshot['Engine'] = value
  when 'EngineVersion' then @db_snapshot['EngineVersion'] = value
  when 'InstanceCreateTime' then @db_snapshot['InstanceCreateTime'] = Time.parse value
  when 'MasterUsername' then @db_snapshot['MasterUsername'] = value
  when 'Port' then @db_snapshot['Port'] = value.to_i
  when 'SnapshotCreateTime' then @db_snapshot['SnapshotCreateTime'] = Time.parse value
  when 'Status' then @db_snapshot['Status'] = value
  end
end

#fresh_snapshotObject



12
13
14
# File 'lib/rackspace-fog/aws/parsers/rds/snapshot_parser.rb', line 12

def fresh_snapshot
  {}
end

#resetObject



8
9
10
# File 'lib/rackspace-fog/aws/parsers/rds/snapshot_parser.rb', line 8

def reset
  @db_snapshot = fresh_snapshot
end

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



16
17
18
19
# File 'lib/rackspace-fog/aws/parsers/rds/snapshot_parser.rb', line 16

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