Class: Nexpose::Device
- Inherits:
-
Object
- Object
- Nexpose::Device
- Defined in:
- lib/nexpose/device.rb
Overview
Object that represents a single device in a Nexpose security console.
Instance Attribute Summary collapse
-
#address ⇒ Object
readonly
IP Address or Hostname of this device.
-
#id ⇒ Object
readonly
A unique device ID (assigned automatically by the Nexpose console).
-
#risk_factor ⇒ Object
readonly
User assigned risk multiplier.
-
#risk_score ⇒ Object
readonly
Nexpose risk score.
-
#site_id ⇒ Object
readonly
Site ID that this device is associated with.
Instance Method Summary collapse
-
#initialize(id, address, site_id, risk_factor = 1.0, risk_score = 0.0) ⇒ Device
constructor
A new instance of Device.
Constructor Details
#initialize(id, address, site_id, risk_factor = 1.0, risk_score = 0.0) ⇒ Device
Returns a new instance of Device.
178 179 180 181 182 183 184 |
# File 'lib/nexpose/device.rb', line 178 def initialize(id, address, site_id, risk_factor = 1.0, risk_score = 0.0) @id = id.to_i @address = address @site_id = site_id.to_i @risk_factor = risk_factor.to_f @risk_score = risk_score.to_f end |
Instance Attribute Details
#address ⇒ Object (readonly)
IP Address or Hostname of this device.
170 171 172 |
# File 'lib/nexpose/device.rb', line 170 def address @address end |
#id ⇒ Object (readonly)
A unique device ID (assigned automatically by the Nexpose console).
168 169 170 |
# File 'lib/nexpose/device.rb', line 168 def id @id end |
#risk_factor ⇒ Object (readonly)
User assigned risk multiplier.
172 173 174 |
# File 'lib/nexpose/device.rb', line 172 def risk_factor @risk_factor end |
#risk_score ⇒ Object (readonly)
Nexpose risk score.
174 175 176 |
# File 'lib/nexpose/device.rb', line 174 def risk_score @risk_score end |
#site_id ⇒ Object (readonly)
Site ID that this device is associated with.
176 177 178 |
# File 'lib/nexpose/device.rb', line 176 def site_id @site_id end |