Class: Nmap::ScanTask
- Inherits:
-
Struct
- Object
- Struct
- Nmap::ScanTask
- Defined in:
- lib/nmap/scan_task.rb
Instance Attribute Summary collapse
-
#end_time ⇒ Object
Returns the value of attribute end_time.
-
#extrainfo ⇒ Object
Returns the value of attribute extrainfo.
-
#name ⇒ Object
Returns the value of attribute name.
-
#start_time ⇒ Object
Returns the value of attribute start_time.
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.
21 22 23 |
# File 'lib/nmap/scan_task.rb', line 21 def initialize(name,start_time,end_time,extrainfo=nil) super end |
Instance Attribute Details
#end_time ⇒ Object
Returns the value of attribute end_time
2 3 4 |
# File 'lib/nmap/scan_task.rb', line 2 def end_time @end_time end |
#extrainfo ⇒ Object
Returns the value of attribute extrainfo
2 3 4 |
# File 'lib/nmap/scan_task.rb', line 2 def extrainfo @extrainfo end |
#name ⇒ Object
Returns the value of attribute name
2 3 4 |
# File 'lib/nmap/scan_task.rb', line 2 def name @name end |
#start_time ⇒ Object
Returns the value of attribute start_time
2 3 4 |
# File 'lib/nmap/scan_task.rb', line 2 def start_time @start_time end |
Instance Method Details
#duration ⇒ Integer
The duration of the scan task.
33 34 35 |
# File 'lib/nmap/scan_task.rb', line 33 def duration (self.end_time - self.start_time) end |
#to_s ⇒ String
Converts the scan task to a String.
45 46 47 |
# File 'lib/nmap/scan_task.rb', line 45 def to_s "#{self.start_time}: #{self.name} (#{self.extrainfo})" end |