Class: Nmap::OSClass

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

Overview

Represents an OS class.

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#accuracyObject

Returns the value of attribute accuracy

Returns:

  • the current value of accuracy



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

def accuracy
  @accuracy
end

#familyObject

Returns the value of attribute family

Returns:

  • the current value of family



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

def family
  @family
end

#typeObject

Returns the value of attribute type

Returns:

  • the current value of type



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

def type
  @type
end

#vendorObject

Returns the value of attribute vendor

Returns:

  • the current value of vendor



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

def vendor
  @vendor
end

Instance Method Details

#to_sString

Converts the OS class to a String.

Returns:

  • The String form of the OS class.



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

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