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.
178 179 180 |
# File 'lib/nexpose/scan.rb', line 178 def initialize(live, dead, filtered, unresolved, other) @live, @dead, @filtered, @unresolved, @other = live, dead, filtered, unresolved, other end |
Instance Attribute Details
#dead ⇒ Object (readonly)
Returns the value of attribute dead.
176 177 178 |
# File 'lib/nexpose/scan.rb', line 176 def dead @dead end |
#filtered ⇒ Object (readonly)
Returns the value of attribute filtered.
176 177 178 |
# File 'lib/nexpose/scan.rb', line 176 def filtered @filtered end |
#live ⇒ Object (readonly)
Returns the value of attribute live.
176 177 178 |
# File 'lib/nexpose/scan.rb', line 176 def live @live end |
#other ⇒ Object (readonly)
Returns the value of attribute other.
176 177 178 |
# File 'lib/nexpose/scan.rb', line 176 def other @other end |
#unresolved ⇒ Object (readonly)
Returns the value of attribute unresolved.
176 177 178 |
# File 'lib/nexpose/scan.rb', line 176 def unresolved @unresolved end |
Class Method Details
.parse(rexml) ⇒ Nodes
Parse REXML to Nodes object.
187 188 189 190 191 192 193 194 |
# File 'lib/nexpose/scan.rb', line 187 def self.parse(rexml) return nil unless rexml return 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 |