Class: Nexpose::ScanSummary::Tasks
- Inherits:
-
Object
- Object
- Nexpose::ScanSummary::Tasks
- Defined in:
- lib/nexpose/scan.rb
Overview
Value class to tracking task counts.
Instance Attribute Summary collapse
-
#active ⇒ Object
readonly
Returns the value of attribute active.
-
#completed ⇒ Object
readonly
Returns the value of attribute completed.
-
#pending ⇒ Object
readonly
Returns the value of attribute pending.
Class Method Summary collapse
-
.parse(rexml) ⇒ Tasks
Parse REXML to Tasks object.
Instance Method Summary collapse
-
#initialize(pending, active, completed) ⇒ Tasks
constructor
A new instance of Tasks.
Constructor Details
#initialize(pending, active, completed) ⇒ Tasks
Returns a new instance of Tasks.
302 303 304 |
# File 'lib/nexpose/scan.rb', line 302 def initialize(pending, active, completed) @pending, @active, @completed = pending, active, completed end |
Instance Attribute Details
#active ⇒ Object (readonly)
Returns the value of attribute active.
300 301 302 |
# File 'lib/nexpose/scan.rb', line 300 def active @active end |
#completed ⇒ Object (readonly)
Returns the value of attribute completed.
300 301 302 |
# File 'lib/nexpose/scan.rb', line 300 def completed @completed end |
#pending ⇒ Object (readonly)
Returns the value of attribute pending.
300 301 302 |
# File 'lib/nexpose/scan.rb', line 300 def pending @pending end |
Class Method Details
.parse(rexml) ⇒ Tasks
Parse REXML to Tasks object.
311 312 313 314 315 316 |
# File 'lib/nexpose/scan.rb', line 311 def self.parse(rexml) return nil unless rexml Tasks.new(rexml.attributes['pending'].to_i, rexml.attributes['active'].to_i, rexml.attributes['completed'].to_i) end |