class Nmap::XML::Hostname

Represents a hostname.

@since 1.0.0

Public Instance Methods

ptr?() click to toggle source

Determines if the hostname is a DNS ‘PTR`.

@return [Boolean]

@since 0.8.0

# File lib/nmap/xml/hostname.rb, line 28
def ptr?
  self.type == 'PTR'
end
to_s() click to toggle source

Converts the hostname to a String.

@return [String]

The name of the host.
# File lib/nmap/xml/hostname.rb, line 38
def to_s
  self.name.to_s
end
user?() click to toggle source

Determines if the hostname was specified by the user.

@return [Boolean]

@since 0.8.0

# File lib/nmap/xml/hostname.rb, line 17
def user?
  self.type == 'user'
end