aboutsummaryrefslogblamecommitdiffstats
path: root/activesupport/lib/active_support/proxy_object.rb
blob: 0965fcd2d9227d6d4a8aba367e6991e999a89468 (plain) (tree)
1
2
3
4
5
6
7
8
9
                             
 






                                                                          
                                                               




                                  
# frozen_string_literal: true

module ActiveSupport
  # A class with no predefined methods that behaves similarly to Builder's
  # BlankSlate. Used for proxy classes.
  class ProxyObject < ::BasicObject
    undef_method :==
    undef_method :equal?

    # Let ActiveSupport::ProxyObject at least raise exceptions.
    def raise(*args)
      ::Object.send(:raise, *args)
    end
  end
end