def add_check(object_or_nil_with_block = nil, &block)
      if block_given?
        check_list.add(block)
      elsif object_or_nil_with_block.respond_to?(:call)
        check_list.add(object_or_nil_with_block)
      else
        raise ArgumentError, 'A check must respond to #call.'
      end
      self
    end
def add_check(object_or_nil_with_block = nil, &block)
      if block_given?
        check_list.add(block)
      elsif object_or_nil_with_block.respond_to?(:call)
        check_list.add(object_or_nil_with_block)
      else
        raise ArgumentError, 'A check must respond to #call.'
      end
      self
    end
Public: Add a pre-built or custom check to your status endpoint. These
 checks are used to test the state of the world of the application, and
 need only respond to `#call`.

 Once added, the given check will be called and passed an instance of this
 checker. If everything is good, do nothing! If there is a problem, use
 `add_error` to add an error message to the checker.

 Examples

   Rapporteur.add_check { |checker|
     checker.add_error(:luck, :bad) if rand(2) == 1
   }

 Returns self.
 Raises ArgumentError if the given check does not respond to call.