Class: DeprecationToolkit::DeprecationSubscriber

Inherits:
ActiveSupport::Subscriber
  • Object
show all
Defined in:
lib/deprecation_toolkit/deprecation_subscriber.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.already_attached?Boolean

Returns:

  • (Boolean)


8
9
10
# File 'lib/deprecation_toolkit/deprecation_subscriber.rb', line 8

def already_attached?
  notifier != nil
end

Instance Method Details

#deprecation(event) ⇒ Object



13
14
15
16
17
# File 'lib/deprecation_toolkit/deprecation_subscriber.rb', line 13

def deprecation(event)
  message = event.payload[:message]

  Collector.collect(message) unless deprecation_allowed?(event.payload)
end