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 Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeReport

Returns a new instance of Report.



10
11
12
# File 'lib/whoops_notifier/report.rb', line 10

def initialize
  self.event_time = Time.now
end

Instance Attribute Details

#ignoreObject

Returns the value of attribute ignore.



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

def ignore
  @ignore
end

Instance Method Details

#ignore?Boolean

Returns:

  • (Boolean)


22
23
24
# File 'lib/whoops_notifier/report.rb', line 22

def ignore?
  ignore
end

#to_hashObject



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

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