Class: Nmap::OSMatch

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

Overview

Represents a match for a specific OS.

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#accuracyObject

Returns the value of attribute accuracy



5
6
7
# File 'lib/nmap/os_match.rb', line 5

def accuracy
  @accuracy
end

#nameObject

Returns the value of attribute name



5
6
7
# File 'lib/nmap/os_match.rb', line 5

def name
  @name
end

Instance Method Details

#to_sString

Converts the OS match to a String.



13
14
15
# File 'lib/nmap/os_match.rb', line 13

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