Class: Fog::Parsers::Redshift::AWS::DescribeEvents

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

Instance Attribute Summary

Attributes inherited from Base

#response

Instance Method Summary collapse

Methods inherited from Base

#attr_value, #characters, #end_element_namespace, #initialize, #start_element_namespace, #value

Constructor Details

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

Instance Method Details

#end_element(name) ⇒ Object



26
27
28
29
30
31
32
33
34
35
36
37
38
39
# File 'lib/fog/aws/parsers/redshift/describe_events.rb', line 26

def end_element(name)            
  super
  case name
  when 'Marker'
    @response[name] = value
  when 'SourceIdentifier', 'SourceType', 'Message'
    @event[name] = value
  when 'Date'
    @event[name] = Time.parse(value)
  when 'Event'
    @response['Events'] << {name => @event}
    @event = {}
  end
end

#resetObject

:marker - (String) :events - (Array)

:source_identifier - (String)
:source_type - (String)
:message - (String)
:date - (Time)


14
15
16
# File 'lib/fog/aws/parsers/redshift/describe_events.rb', line 14

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

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



18
19
20
21
22
23
24
# File 'lib/fog/aws/parsers/redshift/describe_events.rb', line 18

def start_element(name, attrs = [])
  super
  case name
  when 'Events'
    @event = {}
  end
end