Class: Nmap::OSClass
- Inherits:
-
Object
- Object
- Nmap::OSClass
- Defined in:
- lib/nmap/os_class.rb
Instance Attribute Summary collapse
-
#accuracy ⇒ Object
readonly
The accuracy of the OS guess.
-
#family ⇒ Object
readonly
The family of the OS.
-
#type ⇒ Object
readonly
The OS class.
-
#vendor ⇒ Object
readonly
The OS vendor.
Instance Method Summary collapse
-
#initialize(type, vendor, family, accuracy) ⇒ OSClass
constructor
Creates a new OSClass object.
-
#to_s ⇒ String
Converts the OS class to a String.
Constructor Details
#initialize(type, vendor, family, accuracy) ⇒ OSClass
Creates a new OSClass object.
31 32 33 34 35 36 |
# File 'lib/nmap/os_class.rb', line 31 def initialize(type,vendor,family,accuracy) @type = type @vendor = vendor @family = family @accuracy = accuracy end |
Instance Attribute Details
#accuracy ⇒ Object (readonly)
The accuracy of the OS guess
14 15 16 |
# File 'lib/nmap/os_class.rb', line 14 def accuracy @accuracy end |
#family ⇒ Object (readonly)
The family of the OS
11 12 13 |
# File 'lib/nmap/os_class.rb', line 11 def family @family end |
#type ⇒ Object (readonly)
The OS class
5 6 7 |
# File 'lib/nmap/os_class.rb', line 5 def type @type end |
#vendor ⇒ Object (readonly)
The OS vendor
8 9 10 |
# File 'lib/nmap/os_class.rb', line 8 def vendor @vendor end |
Instance Method Details
#to_s ⇒ String
Converts the OS class to a String.
44 45 46 |
# File 'lib/nmap/os_class.rb', line 44 def to_s "#{@type} #{@vendor} (#{@accuracy}%)" end |