Module: DeprecationTracker::KernelWarnTracker

Included in:
DeprecationTracker
Defined in:
lib/deprecation_tracker.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.callbacksObject



17
18
19
# File 'lib/deprecation_tracker.rb', line 17

def self.callbacks
  @callbacks ||= []
end

Instance Method Details

#warn(*messages) ⇒ Object



21
22
23
24
25
26
27
# File 'lib/deprecation_tracker.rb', line 21

def warn(*messages)
  KernelWarnTracker.callbacks.each do |callback|
    messages.each { |message| callback.(message) }
  end

  super
end