lib/nmap/os_match.rb in ruby-nmap-0.5.1 vs lib/nmap/os_match.rb in ruby-nmap-0.6.0

- old
+ new

@@ -1,35 +1,18 @@ module Nmap - class OSMatch + # + # Represents a match for a specific {OS}. + # + class OSMatch < Struct.new(:name, :accuracy) - # 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}%)" + "#{self.name} (#{self.accuracy}%)" end end end