I have been getting a lot of questions about this method in the new version of Nmap::Parser with
all_hosts
all_hosts($status)
Returns an array of all the Nmap::Parser::Host objects for the scan. If the optional status is given, it will only return those hosts that match that status. The status can be any of the following: (up|down|unknown|skipped)