Module: Deprecations::Warn

Defined in:
lib/deprecations/behavior.rb

Class Method Summary collapse

Class Method Details

.call(subject, alternative, outdated) ⇒ Object



53
54
55
56
57
58
# File 'lib/deprecations/behavior.rb', line 53

def self.call(subject, alternative, outdated)
  msg = "`#{subject}` is deprecated"
  msg << (outdated ? " and will be outdated #{outdated}." : '.')
  msg << " Please use `#{alternative}` instead." if alternative
  ::Kernel.warn(msg, uplevel: 3)
end