Class: Hubbado::Log::Controls::Rollbar::Notification

Inherits:
Struct
  • Object
show all
Defined in:
lib/hubbado/log/controls/rollbar.rb

Overview

Rollbar takes its arguments positionally and untyped, assigning each one it recognises over any earlier one of the same kind. So every reader here takes the last match, not the first: a notification is asserted on for what Rollbar would make of it, and a handler passing two of anything must lose the same one here that it loses there.

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#argumentsObject

Returns the value of attribute arguments

Returns:

  • (Object)

    the current value of arguments



12
13
14
# File 'lib/hubbado/log/controls/rollbar.rb', line 12

def arguments
  @arguments
end

#levelObject

Returns the value of attribute level

Returns:

  • (Object)

    the current value of level



12
13
14
# File 'lib/hubbado/log/controls/rollbar.rb', line 12

def level
  @level
end

Instance Method Details

#exceptionObject

::Exception, not Exception — this module has a control of that name, and a bare constant here resolves to it and matches nothing.



17
# File 'lib/hubbado/log/controls/rollbar.rb', line 17

def exception = arguments.grep(::Exception).last

#extraObject



19
# File 'lib/hubbado/log/controls/rollbar.rb', line 19

def extra = arguments.grep(Hash).last

#hashesObject



21
# File 'lib/hubbado/log/controls/rollbar.rb', line 21

def hashes = arguments.grep(Hash).length

#messageObject



13
# File 'lib/hubbado/log/controls/rollbar.rb', line 13

def message = arguments.grep(String).last