Class: RedmineExtensions::Deprecator

Inherits:
Object
  • Object
show all
Defined in:
lib/redmine_extensions/deprecator.rb

Instance Method Summary collapse

Instance Method Details

#deprecation_warning(method_name, message, caller_backtrace = nil) ⇒ Object



4
5
6
7
8
# File 'lib/redmine_extensions/deprecator.rb', line 4

def deprecation_warning(method_name, message, caller_backtrace = nil)
  caller_backtrace ||= caller(2)
  message = "#{method_name} is deprecated and will be removed from RedmineExtensions in v1.0"
  ActiveSupport::Deprecation.warn message, caller_backtrace
end