def each_up_host
      return enum_for(__method__) unless block_given?

      @doc.xpath("/nmaprun/host[status[@state='up']]").each do |host|
        yield Host.new(host)
      end

      return self
    end
def each_up_host
      return enum_for(__method__) unless block_given?

      @doc.xpath("/nmaprun/host[status[@state='up']]").each do |host|
        yield Host.new(host)
      end

      return self
    end
Parses the hosts that were found to be up during the scan.

 @yield [host]
   Each host will be passed to a given block.

 @yieldparam [Host] host
   A host in the scan.

 @return [XML, Enumerator]
   The XML parser. If no block was given, an enumerator object will
   be returned.