Sha256: d6a3419b44d0e048d9af1219f12e0519fb1a26e7f6b408c009298404a8915451

Contents?: true

Size: 557 Bytes

Versions: 8

Compression:

Stored size: 557 Bytes

Contents

# frozen_string_literal: true

module RestfulResource
  class Deprecator < ActiveSupport::Deprecation
    GEM_NAME = 'restful_resource'

    def self.build(horizon: 'soon')
      @deprecators ||= {}
      @deprecators["#{GEM_NAME}@#{horizon}"] ||= new(horizon)
    end

    def initialize(horizon)
      super(horizon, GEM_NAME)

      @app_deprecator = ActiveSupport::Deprecation.instance
    end

    # inherit the default configured behavior for the app
    delegate :behavior, to: :app_deprecator

    private

    attr_reader :app_deprecator
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
restful_resource-2.15.0 lib/restful_resource/deprecator.rb
restful_resource-2.14.0 lib/restful_resource/deprecator.rb
restful_resource-2.13.4 lib/restful_resource/deprecator.rb
restful_resource-2.13.3 lib/restful_resource/deprecator.rb
restful_resource-2.13.2 lib/restful_resource/deprecator.rb
restful_resource-2.13.1 lib/restful_resource/deprecator.rb
restful_resource-2.13.0 lib/restful_resource/deprecator.rb
restful_resource-2.12.1 lib/restful_resource/deprecator.rb