lib/method_disabling.rb
def to_proc
      disabled_method = self

      # This proc will be evaluated with "self" set to the original object.
      Proc.new do |*args, &block|
        disabled_method.execute(self, *args, &block)
      end
    end
def to_proc
      disabled_method = self

      # This proc will be evaluated with "self" set to the original object.
      Proc.new do |*args, &block|
        disabled_method.execute(self, *args, &block)
      end
    end
Returns a Proc that acts as a replacement for the disabled method.