Sha256: 1e9c0f071f93f9d2526ede0e751a62b15ce8755e27ca28582fa8a7700d29b952

Contents?: true

Size: 597 Bytes

Versions: 8

Compression:

Stored size: 597 Bytes

Contents

module Nmap
  class OSMatch

    # The name of the OS
    attr_reader :name

    # The accuracy of the OS guess
    attr_reader :accuracy

    #
    # Creates a OSMatch object.
    #
    # @param [String] name
    #   The name of the OS.
    #
    # @param [Integer] accuracy
    #   The accuracy of the OS guess.
    #
    def initialize(name,accuracy)
      @name = name
      @accuracy = accuracy
    end

    #
    # Converts the OS match to a String.
    #
    # @return [String]
    #   The String form of the OS match.
    #
    def to_s
      "#{@name} (#{@accuracy}%)"
    end

  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
ruby-nmap-0.5.1 lib/nmap/os_match.rb
ruby-nmap-0.5.0 lib/nmap/os_match.rb
ruby-nmap-0.4.1 lib/nmap/os_match.rb
ruby-nmap-0.4.0 lib/nmap/os_match.rb
ruby-nmap-0.3.0 lib/nmap/os_match.rb
ruby-nmap-0.2.0 lib/nmap/os_match.rb
ruby-nmap-0.1.1 lib/nmap/os_match.rb
ruby-nmap-0.1.0 lib/nmap/os_match.rb