Class: ExceptionNotifier::HatoNotifier
- Inherits:
-
Object
- Object
- ExceptionNotifier::HatoNotifier
- Defined in:
- lib/exception_notifier/hato_notifier.rb,
lib/exception_notifier/hato_notifier/version.rb
Defined Under Namespace
Classes: ConfigurationError, Logger, Query
Constant Summary collapse
- VERSION =
"0.0.3"
Instance Attribute Summary collapse
-
#logger ⇒ Object
readonly
Returns the value of attribute logger.
Instance Method Summary collapse
- #call(exception, options = {}) ⇒ Object
-
#initialize(options) ⇒ HatoNotifier
constructor
A new instance of HatoNotifier.
Constructor Details
#initialize(options) ⇒ HatoNotifier
Returns a new instance of HatoNotifier.
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/exception_notifier/hato_notifier.rb', line 7 def initialize() template = .delete(:template) raise ConfigurationError.new('`template` key must be set') unless template @tag_template = template.delete(:tag) @message_template = template.delete(:message) if !@tag_template || !@message_template raise ConfigurationError.new('Both `templlate.message` and `templlate.message` keys must be set') end @logger = Logger.new( host: .delete(:host), port: .delete(:port), api_key: .delete(:api_key), ) end |
Instance Attribute Details
#logger ⇒ Object (readonly)
Returns the value of attribute logger.
5 6 7 |
# File 'lib/exception_notifier/hato_notifier.rb', line 5 def logger @logger end |