Sha256: 879f2fe7381836b1e02205c694618d67d33c52a44110ea647f04b0e845efea7d
Contents?: true
Size: 1.06 KB
Versions: 1
Compression:
Stored size: 1.06 KB
Contents
module Nmap class ScanTask < Struct.new(:name, :start_time, :end_time, :extrainfo) # # Creates a new ScanTask object. # # @param [String] name # The name of the scan task. # # @param [Time] start_time # The time the scan task begun. # # @param [Time] end_time # The time the scan task ended. # # @param [String] extrainfo # Any extra information relating to the scan task. # # @since 0.1.2 # def initialize(name,start_time,end_time,extrainfo=nil) super end # @since 0.10.0 alias extra_info extrainfo # # The duration of the scan task. # # @return [Integer] # The number of seconds it took the scan task to complete. # # @since 0.1.2 # def duration (self.end_time - self.start_time) end # # Converts the scan task to a String. # # @return [String] # The String form of the scan task. # # @since 0.1.2 # def to_s "#{self.start_time}: #{self.name} (#{self.extrainfo})" end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
ruby-nmap-0.10.0 | lib/nmap/scan_task.rb |