Method: Nmap::XML#each_up_host
- Defined in:
- lib/nmap/xml.rb
#each_up_host {|host| ... } ⇒ XML, Enumerator
Parses the hosts that were found to be up during the scan.
393 394 395 396 397 398 399 400 401 |
# File 'lib/nmap/xml.rb', line 393 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 |