Sha256: 35c1015fee4b1a8213fdabbe0e213795880954f13ca8da5dc17c17ea64dfb6fa

Contents?: true

Size: 651 Bytes

Versions: 4

Compression:

Stored size: 651 Bytes

Contents

module RailsConnector
  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 CloudConnector. "
        message << "Please use #{new_method_name} instead" if new_method_name
        message
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
infopark_cloud_connector-7.1.0 lib/rails_connector/deprecation.rb
infopark_cloud_connector-7.0.2 lib/rails_connector/deprecation.rb
infopark_cloud_connector-7.0.1 lib/rails_connector/deprecation.rb
infopark_cloud_connector-7.0.0 lib/rails_connector/deprecation.rb