module FactoryBot
  class Decorator < BasicObject
    undef_method :==

    def initialize(component)
      @component = component
    end

    def method_missing(name, *args, &block) # rubocop:disable Style/MethodMissingSuper
      @component.send(name, *args, &block)
    end

    def respond_to_missing?(name, include_private = false)
      @component.respond_to?(name, true) || super
    end

    def send(symbol, *args, &block)
      __send__(symbol, *args, &block)
    end
  end
end

module FactoryBot
  class Decorator < BasicObject
    undef_method :==

    def initialize(component)
      @component = component
    end

    def method_missing(name, *args, &block) # rubocop:disable Style/MethodMissingSuper
      @component.send(name, *args, &block)
    end

    def respond_to_missing?(name, include_private = false)
      @component.respond_to?(name, true) || super
    end

    def send(symbol, *args, &block)
      __send__(symbol, *args, &block)
    end

    def self.const_missing(name)
      ::Object.const_get(name)
    end
  end
end

Revert "Remove redundant const_missing class method."
Revert "Remove redundant const_missing class method."

This reverts commit df5471078ce1fd45f094ad77c892ee9657d13c92.
