Class: Nexpose::Scan
- Inherits:
-
Object
- Object
- Nexpose::Scan
- Defined in:
- lib/nexpose/scan.rb
Overview
Struct class for tracking scan launch information.
Defined Under Namespace
Modules: Status
Instance Attribute Summary collapse
-
#engine ⇒ Object
readonly
The engine the scan was dispatched to.
-
#id ⇒ Object
readonly
The scan ID when a scan is successfully launched.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(scan_id, engine_id) ⇒ Scan
constructor
A new instance of Scan.
Constructor Details
#initialize(scan_id, engine_id) ⇒ Scan
Returns a new instance of Scan.
720 721 722 |
# File 'lib/nexpose/scan.rb', line 720 def initialize(scan_id, engine_id) @id, @engine = scan_id, engine_id end |
Instance Attribute Details
#engine ⇒ Object (readonly)
The engine the scan was dispatched to.
718 719 720 |
# File 'lib/nexpose/scan.rb', line 718 def engine @engine end |
#id ⇒ Object (readonly)
The scan ID when a scan is successfully launched.
716 717 718 |
# File 'lib/nexpose/scan.rb', line 716 def id @id end |
Class Method Details
.parse(xml) ⇒ Object
724 725 726 727 728 729 |
# File 'lib/nexpose/scan.rb', line 724 def self.parse(xml) xml.elements.each('//Scan') do |scan| return new(scan.attributes['scan-id'].to_i, scan.attributes['engine-id'].to_i) end end |