Class: Nexpose::VulnFilter
- Inherits:
-
Object
- Object
- Nexpose::VulnFilter
- Includes:
- Sanitize
- Defined in:
- lib/nexpose/vuln.rb
Overview
TODO: review
Description
Instance Attribute Summary collapse
-
#maxAlerts ⇒ Object
readonly
Returns the value of attribute maxAlerts.
-
#severityThreshold ⇒ Object
readonly
Returns the value of attribute severityThreshold.
-
#typeMask ⇒ Object
readonly
Returns the value of attribute typeMask.
Instance Method Summary collapse
-
#initialize(type_mask, severity_threshold, max_alerts = -1)) ⇒ VulnFilter
constructor
A new instance of VulnFilter.
- #to_xml ⇒ Object
Methods included from Sanitize
Constructor Details
#initialize(type_mask, severity_threshold, max_alerts = -1)) ⇒ VulnFilter
Returns a new instance of VulnFilter.
492 493 494 495 496 |
# File 'lib/nexpose/vuln.rb', line 492 def initialize(type_mask, severity_threshold, max_alerts = -1) @typeMask = type_mask @maxAlerts = max_alerts @severityThreshold = severity_threshold end |
Instance Attribute Details
#maxAlerts ⇒ Object (readonly)
Returns the value of attribute maxAlerts.
489 490 491 |
# File 'lib/nexpose/vuln.rb', line 489 def maxAlerts @maxAlerts end |
#severityThreshold ⇒ Object (readonly)
Returns the value of attribute severityThreshold.
490 491 492 |
# File 'lib/nexpose/vuln.rb', line 490 def severityThreshold @severityThreshold end |
#typeMask ⇒ Object (readonly)
Returns the value of attribute typeMask.
488 489 490 |
# File 'lib/nexpose/vuln.rb', line 488 def typeMask @typeMask end |
Instance Method Details
#to_xml ⇒ Object
500 501 502 503 504 505 506 507 |
# File 'lib/nexpose/vuln.rb', line 500 def to_xml xml = '<vulnFilter ' xml << %Q{ type_mask="#{replace_entities(typeMask)}"} xml << %Q{ maxAlerts="#{replace_entities(maxAlerts)}"} xml << %Q{ severity_threshold="#{replace_entities(severityThreshold)}"} xml << '/>' xml end |