Class: AwsAlertMonitor::Event

Inherits:
Object
  • Object
show all
Defined in:
lib/aws-alert-monitor/event.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(message) ⇒ Event

Returns a new instance of Event.



8
9
10
11
# File 'lib/aws-alert-monitor/event.rb', line 8

def initialize(message)
  @raw_data     = JSON.parse(message)
  @message_data = determine_message_data
end

Instance Attribute Details

#message_dataObject (readonly)

Returns the value of attribute message_data.



5
6
7
# File 'lib/aws-alert-monitor/event.rb', line 5

def message_data
  @message_data
end

#raw_dataObject (readonly)

Returns the value of attribute raw_data.



6
7
8
# File 'lib/aws-alert-monitor/event.rb', line 6

def raw_data
  @raw_data
end

Instance Method Details

#bodyObject

Raises:

  • (NotImplementedError)


13
14
15
# File 'lib/aws-alert-monitor/event.rb', line 13

def body
  raise NotImplementedError
end

#subjectObject



17
18
19
# File 'lib/aws-alert-monitor/event.rb', line 17

def subject
  @raw_data['Subject']
end

#typeObject

Raises:

  • (NotImplementedError)


21
22
23
# File 'lib/aws-alert-monitor/event.rb', line 21

def type
  raise NotImplementedError
end