Class: Nmap::OSMatch
- Inherits:
-
Object
- Object
- Nmap::OSMatch
- Defined in:
- lib/nmap/os_match.rb
Instance Attribute Summary collapse
-
#accuracy ⇒ Object
readonly
The accuracy of the OS guess.
-
#name ⇒ Object
readonly
The name of the OS.
Instance Method Summary collapse
-
#initialize(name, accuracy) ⇒ OSMatch
constructor
Creates a OSMatch object.
-
#to_s ⇒ String
Converts the OS match to a String.
Constructor Details
#initialize(name, accuracy) ⇒ OSMatch
Creates a OSMatch object.
19 20 21 22 |
# File 'lib/nmap/os_match.rb', line 19 def initialize(name,accuracy) @name = name @accuracy = accuracy end |
Instance Attribute Details
#accuracy ⇒ Object (readonly)
The accuracy of the OS guess
8 9 10 |
# File 'lib/nmap/os_match.rb', line 8 def accuracy @accuracy end |
#name ⇒ Object (readonly)
The name of the OS
5 6 7 |
# File 'lib/nmap/os_match.rb', line 5 def name @name end |
Instance Method Details
#to_s ⇒ String
Converts the OS match to a String.
30 31 32 |
# File 'lib/nmap/os_match.rb', line 30 def to_s "#{@name} (#{@accuracy}%)" end |