module Dry::Core::Deprecations

def warn(msg, tag: nil, uplevel: nil)

Parameters:
  • Caller (Integer) -- frame to add to the message
  • tag (String) -- Tag to help identify the source of the warning.
  • msg (String) -- Warning string
def warn(msg, tag: nil, uplevel: nil)
  caller_info = uplevel.nil? ? nil : "#{caller_locations(uplevel + 2, 1)[0]} "
  tag = "[#{tag || "deprecated"}] "
  hint = msg.gsub(/^\s+/, "")
  logger.warn("#{caller_info}#{tag}#{hint}")
end