Class: Nmap::XML::ScanTask
- Inherits:
-
Struct
- Object
- Struct
- Nmap::XML::ScanTask
- Defined in:
- lib/nmap/xml/scan_task.rb
Overview
Instance Attribute Summary collapse
-
#end_time ⇒ Object
Returns the value of attribute end_time.
-
#extra_info ⇒ Object
Returns the value of attribute extra_info.
-
#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, extra_info = 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, extra_info = nil) ⇒ ScanTask
Creates a new ScanTask object.
25 26 27 |
# File 'lib/nmap/xml/scan_task.rb', line 25 def initialize(name,start_time,end_time,extra_info=nil) super end |
Instance Attribute Details
#end_time ⇒ Object
Returns the value of attribute end_time
6 7 8 |
# File 'lib/nmap/xml/scan_task.rb', line 6 def end_time @end_time end |
#extra_info ⇒ Object
Returns the value of attribute extra_info
6 7 8 |
# File 'lib/nmap/xml/scan_task.rb', line 6 def extra_info @extra_info end |
#name ⇒ Object
Returns the value of attribute name
6 7 8 |
# File 'lib/nmap/xml/scan_task.rb', line 6 def name @name end |
#start_time ⇒ Object
Returns the value of attribute start_time
6 7 8 |
# File 'lib/nmap/xml/scan_task.rb', line 6 def start_time @start_time end |
Instance Method Details
#duration ⇒ Integer
The duration of the scan task.
37 38 39 |
# File 'lib/nmap/xml/scan_task.rb', line 37 def duration (self.end_time - self.start_time) end |
#to_s ⇒ String
Converts the scan task to a String.
49 50 51 |
# File 'lib/nmap/xml/scan_task.rb', line 49 def to_s "#{self.start_time}: #{self.name} (#{self.extra_info})" end |