Module: ActiveSupport::Deprecation::ClassMethods

Defined in:
lib/roxml/extensions/deprecation.rb

Instance Method Summary collapse

Instance Method Details

#deprecated_method_warning(method_name, message = nil) ⇒ Object



23
24
25
26
27
28
29
30
# File 'lib/roxml/extensions/deprecation.rb', line 23

def deprecated_method_warning(method_name, message=nil)
  warning = "#{method_name} is deprecated and will be removed from the next major or minor release"
  case message
    when Symbol then "#{warning}. (use #{message} instead)"
    when String then "#{warning}. (#{message})"
    else warning
  end
end