Class: AttrDeprecated::AirbrakeNotifier
- Inherits:
-
Object
- Object
- AttrDeprecated::AirbrakeNotifier
- Defined in:
- lib/notifiers/airbrake_notifier.rb
Instance Method Summary collapse
-
#initialize(target) ⇒ AirbrakeNotifier
constructor
A new instance of AirbrakeNotifier.
- #notify_airbrake(attribute) ⇒ Object
Constructor Details
#initialize(target) ⇒ AirbrakeNotifier
Returns a new instance of AirbrakeNotifier.
3 4 5 |
# File 'lib/notifiers/airbrake_notifier.rb', line 3 def initialize(target) @target = target end |
Instance Method Details
#notify_airbrake(attribute) ⇒ Object
7 8 9 10 11 12 13 14 15 |
# File 'lib/notifiers/airbrake_notifier.rb', line 7 def notify_airbrake(attribute) if defined?(Airbrake) Airbrake.notify Exception.new "WARNING: Called deprecated attribute for #{klass.name}: #{attrs.join(', ')}\n" + backtrace.map { |trace| "\t#{trace}" }.join("\n") end rescue end |