Class: Nexpose::ScanSummary::Nodes
- Inherits:
-
Object
- Object
- Nexpose::ScanSummary::Nodes
- Defined in:
- lib/nexpose/scan.rb
Overview
Value class for tracking node counts.
Instance Attribute Summary collapse
-
#dead ⇒ Object
readonly
Returns the value of attribute dead.
-
#filtered ⇒ Object
readonly
Returns the value of attribute filtered.
-
#live ⇒ Object
readonly
Returns the value of attribute live.
-
#other ⇒ Object
readonly
Returns the value of attribute other.
-
#unresolved ⇒ Object
readonly
Returns the value of attribute unresolved.
Class Method Summary collapse
-
.parse(rexml) ⇒ Nodes
Parse REXML to Nodes object.
Instance Method Summary collapse
-
#initialize(live, dead, filtered, unresolved, other) ⇒ Nodes
constructor
A new instance of Nodes.
Constructor Details
#initialize(live, dead, filtered, unresolved, other) ⇒ Nodes
Returns a new instance of Nodes.
634 635 636 637 638 639 640 |
# File 'lib/nexpose/scan.rb', line 634 def initialize(live, dead, filtered, unresolved, other) @live = live @dead = dead @filtered = filtered @unresolved = unresolved @other = other end |
Instance Attribute Details
#dead ⇒ Object (readonly)
Returns the value of attribute dead.
632 633 634 |
# File 'lib/nexpose/scan.rb', line 632 def dead @dead end |
#filtered ⇒ Object (readonly)
Returns the value of attribute filtered.
632 633 634 |
# File 'lib/nexpose/scan.rb', line 632 def filtered @filtered end |
#live ⇒ Object (readonly)
Returns the value of attribute live.
632 633 634 |
# File 'lib/nexpose/scan.rb', line 632 def live @live end |
#other ⇒ Object (readonly)
Returns the value of attribute other.
632 633 634 |
# File 'lib/nexpose/scan.rb', line 632 def other @other end |
#unresolved ⇒ Object (readonly)
Returns the value of attribute unresolved.
632 633 634 |
# File 'lib/nexpose/scan.rb', line 632 def unresolved @unresolved end |
Class Method Details
.parse(rexml) ⇒ Nodes
Parse REXML to Nodes object.
647 648 649 650 651 652 653 654 |
# File 'lib/nexpose/scan.rb', line 647 def self.parse(rexml) return nil unless rexml Nodes.new(rexml.attributes['live'].to_i, rexml.attributes['dead'].to_i, rexml.attributes['filtered'].to_i, rexml.attributes['unresolved'].to_i, rexml.attributes['other'].to_i) end |