def add(after_hook = nil, &block)
      if block_given?
        @after_hooks << block
      elsif after_hook.respond_to? :call
        @after_hooks << after_hook
      else
        raise ArgumentError, 'expected block or object responding to #call'
      end
    end
def add(after_hook = nil, &block)
      if block_given?
        @after_hooks << block
      elsif after_hook.respond_to? :call
        @after_hooks << after_hook
      else
        raise ArgumentError, 'expected block or object responding to #call'
      end
    end
Adds new after hook.

 @example
   browser.after_hooks.add do |browser|
     browser.text.include?("Server Error") and puts "Application exception or 500 error!"
   end
   browser.goto "watir.com/404"
   "Application exception or 500 error!"

 @param [#call] after_hook Object responding to call
 @yield after_hook block
 @yieldparam [Watir::Browser]