lib/scrivito/deprecation.rb in scrivito_sdk-1.9.1 vs lib/scrivito/deprecation.rb in scrivito_sdk-1.10.0.rc1
- old
+ new
@@ -1,22 +1,18 @@
module Scrivito
class Deprecation
- class << self
- def warn(message, source = caller(1))
- ActiveSupport::Deprecation.warn(message, source)
- end
+ def self.warn(message, source = caller(1))
+ ActiveSupport::Deprecation.warn(message, source)
+ end
- def warn_method(deprecated_method_name, new_method_name = nil)
- warn(warn_method_message(deprecated_method_name, new_method_name), caller(1))
- end
+ def self.warn_method(deprecated_method_name, new_method_name = nil)
+ warn(warn_method_message(deprecated_method_name, new_method_name), caller(1))
+ end
- private
-
- def warn_method_message(deprecated_method_name, new_method_name = nil)
- message = "The method #{deprecated_method_name} is deprecated and will be removed "\
- "from the Scrivito SDK in the next major version. "
- message << "Please use #{new_method_name} instead" if new_method_name
- message
- end
+ private_class_method def self.warn_method_message(deprecated_method_name, new_method_name = nil)
+ message = "The method #{deprecated_method_name} is deprecated and will be removed "\
+ "from the Scrivito SDK in the next major version. "
+ message << "Please use #{new_method_name} instead" if new_method_name
+ message
end
end
end