Class: WhoopsNotifier::Report

Inherits:
Object
  • Object
show all
Defined in:
lib/whoops_notifier/report.rb

Constant Summary collapse

ATTRIBUTES =
[:event_type, :service, :environment, :message, :event_group_identifier, :event_time, :details]

Instance Method Summary collapse

Constructor Details

#initializeReport

Returns a new instance of Report.



8
9
10
# File 'lib/whoops_notifier/report.rb', line 8

def initialize
  self.event_time = Time.now
end

Instance Method Details

#to_hashObject



12
13
14
15
16
17
18
# File 'lib/whoops_notifier/report.rb', line 12

def to_hash
  h = {}
  ATTRIBUTES.each do |attribute|
    h[attribute] = self.send(attribute)
  end
  h
end