ruby-nmap is a Ruby library that provides programmatic access to the nmap network scanning tool. It consists of two main components: 1) A command-line interface builder (Nmap::Command) that allows Ruby programs to configure and execute nmap scans with full access to nmap's options through a Ruby DSL, and 2) An XML parser (Nmap::XML) that converts nmap's XML output into navigable Ruby objects representing hosts, ports, services, OS detection results, and script output. The library acts as a bridge between Ruby applications and the nmap executable, handling the complexity of command-line argument construction and XML parsing while providing an idiomatic Ruby interface. The project is actively maintained with recent commits, comprehensive test coverage, and support for multiple Ruby versions.