Sha256: 837dedf3bd7108a23c060b155ec2139592488e5717ba13be13fccf9a43e46d4e

Contents?: true

Size: 643 Bytes

Versions: 57

Compression:

Stored size: 643 Bytes

Contents

module Scrivito
  class Deprecation
    class << self
      def warn(message, source = caller(1))
        ActiveSupport::Deprecation.warn(message, source)
      end

      def warn_method(depricated_method_name, new_method_name = nil)
        warn(warn_method_message(depricated_method_name, new_method_name), caller(1))
      end

      private

      def warn_method_message(depricated_method_name, new_method_name = nil)
        message = "The method #{depricated_method_name} will be removed from the Scrivito SDK. "
        message << "Please use #{new_method_name} instead" if new_method_name
        message
      end
    end
  end
end

Version data entries

57 entries across 57 versions & 1 rubygems

Version Path
scrivito_sdk-1.0.0 lib/scrivito/deprecation.rb
scrivito_sdk-1.0.0.rc4 lib/scrivito/deprecation.rb
scrivito_sdk-1.0.0.rc3 lib/scrivito/deprecation.rb
scrivito_sdk-1.0.0.rc2 lib/scrivito/deprecation.rb
scrivito_sdk-1.0.0.rc1 lib/scrivito/deprecation.rb
scrivito_sdk-0.90.0 lib/scrivito/deprecation.rb
scrivito_sdk-0.90.0.rc3 lib/scrivito/deprecation.rb
scrivito_sdk-0.90.0.rc2 lib/scrivito/deprecation.rb
scrivito_sdk-0.90.0.rc1 lib/scrivito/deprecation.rb
scrivito_sdk-0.70.2 lib/scrivito/deprecation.rb
scrivito_sdk-0.71.2 lib/scrivito/deprecation.rb
scrivito_sdk-0.71.1 lib/scrivito/deprecation.rb
scrivito_sdk-0.70.1 lib/scrivito/deprecation.rb
scrivito_sdk-0.71.0 lib/scrivito/deprecation.rb
scrivito_sdk-0.71.0.rc2 lib/scrivito/deprecation.rb
scrivito_sdk-0.71.0.rc1 lib/scrivito/deprecation.rb
scrivito_sdk-0.70.0 lib/scrivito/deprecation.rb
scrivito_sdk-0.70.0.rc3 lib/scrivito/deprecation.rb
scrivito_sdk-0.70.0.rc2 lib/scrivito/deprecation.rb
scrivito_sdk-0.70.0.rc1 lib/scrivito/deprecation.rb