Class: Err::Airbrake
Class Method Summary collapse
- .available? ⇒ Boolean
- .configure(&block) ⇒ Object
- .development_environments=(envs) ⇒ Object
- .ignore=(exception_names) ⇒ Object
- .message(msg, params = {}) ⇒ Object
- .notify(exception, params = {}) ⇒ Object
Methods inherited from Service
Class Method Details
.available? ⇒ Boolean
4 5 6 |
# File 'lib/err/services/airbrake.rb', line 4 def available? defined?(::Airbrake) end |
.configure(&block) ⇒ Object
8 9 10 11 |
# File 'lib/err/services/airbrake.rb', line 8 def configure(&block) return unless enabled? airbrake.configure(&block) end |
.development_environments=(envs) ⇒ Object
13 14 15 |
# File 'lib/err/services/airbrake.rb', line 13 def development_environments=(envs) config.development_environments = envs.map(&:to_s) end |
.ignore=(exception_names) ⇒ Object
17 18 19 20 |
# File 'lib/err/services/airbrake.rb', line 17 def ignore=(exception_names) config.ignore.clear config.ignore.concat exception_names end |
.message(msg, params = {}) ⇒ Object
26 27 28 |
# File 'lib/err/services/airbrake.rb', line 26 def (msg, params = {}) airbrake.notify(msg, parameters: params) end |
.notify(exception, params = {}) ⇒ Object
22 23 24 |
# File 'lib/err/services/airbrake.rb', line 22 def notify(exception, params = {}) airbrake.notify_or_ignore(exception, parameters: params) end |