Sha256: c599376fd63cac776aecfd0a00065b8f1d4c466db1f49c0ef5347149e5fb4928
Contents?: true
Size: 581 Bytes
Versions: 60
Compression:
Stored size: 581 Bytes
Contents
# frozen_string_literal: true module Decidim # # This class handles all logic regarding deprecated methods. # module Deprecations # Define a deprecated alias for a method # # @param [Symbol] old_name - name of the method to deprecate # @param [Symbol] replacement - name of the new method to use def deprecated_alias(old_name, replacement) define_method(old_name) do |*args, &block| ActiveSupport::Deprecation.warn "##{old_name} deprecated (please use ##{replacement})" send replacement, *args, &block end end end end
Version data entries
60 entries across 60 versions & 1 rubygems