Class: WhoopsLogger::Message

Inherits:
Object
  • Object
show all
Defined in:
lib/whoops_logger/message.rb

Constant Summary collapse

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeMessage

Returns a new instance of Message.



19
20
21
# File 'lib/whoops_logger/message.rb', line 19

def initialize
  self.event_time = Time.now
end

Instance Attribute Details

#ignoreObject

Returns the value of attribute ignore.



17
18
19
# File 'lib/whoops_logger/message.rb', line 17

def ignore
  @ignore
end

Instance Method Details

#ignore?Boolean

Returns:

  • (Boolean)


31
32
33
# File 'lib/whoops_logger/message.rb', line 31

def ignore?
  ignore
end

#to_hashObject



23
24
25
26
27
28
29
# File 'lib/whoops_logger/message.rb', line 23

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