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



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

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)


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

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

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



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

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