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



18
19
20
21
22
23
24
25
# File 'lib/roxml/extensions/deprecation.rb', line 18

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