Class: Nmap::XML::OSMatch

Inherits:
Struct
  • Object
show all
Defined in:
lib/nmap/xml/os_match.rb

Overview

Represents a match for a specific OS.

Since:

  • 1.0.0

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#accuracyObject

Returns the value of attribute accuracy

Returns:

  • (Object)

    the current value of accuracy



10
11
12
# File 'lib/nmap/xml/os_match.rb', line 10

def accuracy
  @accuracy
end

#nameObject

Returns the value of attribute name

Returns:

  • (Object)

    the current value of name



10
11
12
# File 'lib/nmap/xml/os_match.rb', line 10

def name
  @name
end

Instance Method Details

#to_sString

Converts the OS match to a String.

Returns:

  • (String)

    The String form of the OS match.

Since:

  • 1.0.0



18
19
20
# File 'lib/nmap/xml/os_match.rb', line 18

def to_s
  "#{self.name} (#{self.accuracy}%)"
end