module Qpid::Proton::Util::Deprecation

@private

Constants

DEPRECATE_FULL_TRACE
MATCH_DIR

Public Class Methods

deprecated(old, new=nil) click to toggle source
# File lib/util/deprecation.rb, line 25
def self.deprecated(old, new=nil)
  replace = new ? "use `#{new}`" : "internal use only"

  from = DEPRECATE_FULL_TRACE ? caller(2).join("\n") : caller.find { |l| not MATCH_DIR.match(l) }
  warn "[DEPRECATION] `#{old}` is deprecated, #{replace}. Called from #{from}"
end
included(other) click to toggle source
# File lib/util/deprecation.rb, line 44
def self.included(other)
  other.extend ClassMethods
end

Public Instance Methods

deprecated(*arg) click to toggle source
# File lib/util/deprecation.rb, line 32
def deprecated(*arg) Deprecation.deprecated(*arg); end