Class: Nmap::ScanTask
- Inherits:
-
Object
- Object
- Nmap::ScanTask
- Defined in:
- lib/nmap/scan_task.rb
Instance Attribute Summary collapse
-
#end_time ⇒ Object
readonly
The time the scan task ended.
-
#extrainfo ⇒ Object
readonly
Extra information on the scan task.
-
#name ⇒ Object
readonly
The name of the scan task.
-
#start_time ⇒ Object
readonly
The time the scan task begun.
Instance Method Summary collapse
-
#duration ⇒ Integer
The duration of the scan task.
-
#initialize(name, start_time, end_time, extrainfo = nil) ⇒ ScanTask
constructor
Creates a new ScanTask object.
-
#to_s ⇒ String
Converts the scan task to a String.
Constructor Details
#initialize(name, start_time, end_time, extrainfo = nil) ⇒ ScanTask
Creates a new ScanTask object.
33 34 35 36 37 38 |
# File 'lib/nmap/scan_task.rb', line 33 def initialize(name,start_time,end_time,extrainfo=nil) @name = name @start_time = start_time @end_time = end_time @extrainfo = extrainfo end |
Instance Attribute Details
#end_time ⇒ Object (readonly)
The time the scan task ended
11 12 13 |
# File 'lib/nmap/scan_task.rb', line 11 def end_time @end_time end |
#extrainfo ⇒ Object (readonly)
Extra information on the scan task
14 15 16 |
# File 'lib/nmap/scan_task.rb', line 14 def extrainfo @extrainfo end |
#name ⇒ Object (readonly)
The name of the scan task
5 6 7 |
# File 'lib/nmap/scan_task.rb', line 5 def name @name end |
#start_time ⇒ Object (readonly)
The time the scan task begun
8 9 10 |
# File 'lib/nmap/scan_task.rb', line 8 def start_time @start_time end |
Instance Method Details
#duration ⇒ Integer
The duration of the scan task.
48 49 50 |
# File 'lib/nmap/scan_task.rb', line 48 def duration (@end_time - @start_time) end |
#to_s ⇒ String
Converts the scan task to a String.
60 61 62 |
# File 'lib/nmap/scan_task.rb', line 60 def to_s "#{@start}: #{@name} (#{@extrainfo})" end |