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

Version Path
decidim-core-0.25.0.rc4 lib/decidim/deprecations.rb
decidim-core-0.25.0.rc3 lib/decidim/deprecations.rb
decidim-core-0.25.0.rc2 lib/decidim/deprecations.rb
decidim-core-0.25.0.rc1 lib/decidim/deprecations.rb
decidim-core-0.24.3 lib/decidim/deprecations.rb
decidim-core-0.23.6 lib/decidim/deprecations.rb
decidim-core-0.24.2 lib/decidim/deprecations.rb
decidim-core-0.23.5 lib/decidim/deprecations.rb
decidim-core-0.24.1 lib/decidim/deprecations.rb
decidim-core-0.24.0 lib/decidim/deprecations.rb
decidim-core-0.24.0.rc2 lib/decidim/deprecations.rb
decidim-core-0.23.4 lib/decidim/deprecations.rb
decidim-core-0.24.0.rc1 lib/decidim/deprecations.rb
decidim-core-0.23.3 lib/decidim/deprecations.rb
decidim-core-0.23.2 lib/decidim/deprecations.rb
decidim-core-0.23.1 lib/decidim/deprecations.rb
decidim-core-0.23.1.rc1 lib/decidim/deprecations.rb
decidim-core-0.23.0 lib/decidim/deprecations.rb
decidim-core-0.22.0 lib/decidim/deprecations.rb
decidim-core-0.21.0 lib/decidim/deprecations.rb