Sha256: 078ef25404bb81b4d05245e06756c37272d0d399935fd7ad95b6778530a008d4

Contents?: true

Size: 814 Bytes

Versions: 9

Compression:

Stored size: 814 Bytes

Contents

module SpudDeprecatedNamespace
  def const_missing(const)
    ActiveSupport::Deprecation.warn(
      'The Spud namespace is being replaced by TbCore. Please update your app code accordingly.',
      caller
    )
    TbCore.const_get(const)
  end

  def method_missing(method_signature, *args, &block)
    if TbCore.respond_to?(method_signature)
      ActiveSupport::Deprecation.warn(
        'The Spud::Core namespace is being replaced by TbCore. Please update your app code accordingly.',
        caller
      )
      TbCore.__send__(method_signature, *args, &block)
    else
      super
    end
  end

  def respond_to_missing?(method_signature)
    TbCore.respond_to?(method_signature) || super
  end
end

module Spud
  extend SpudDeprecatedNamespace
end

module Spud::Core
  extend SpudDeprecatedNamespace
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
tb_core-1.5.4 lib/tb_core/spud_core.rb
tb_core-1.5.3 lib/tb_core/spud_core.rb
tb_core-1.5.2 lib/tb_core/spud_core.rb
tb_core-1.5.1 lib/tb_core/spud_core.rb
tb_core-1.5.0 lib/tb_core/spud_core.rb
tb_core-1.4.8 lib/tb_core/spud_core.rb
tb_core-1.4.7 lib/tb_core/spud_core.rb
tb_core-1.4.6 lib/tb_core/spud_core.rb
tb_core-1.4.5 lib/tb_core/spud_core.rb