Class: Nexpose::Device
- Inherits:
-
Object
- Object
- Nexpose::Device
- Defined in:
- lib/nexpose.rb
Overview
Description
Object that represents a single device in an NSC.
Instance Attribute Summary collapse
-
#address ⇒ Object
readonly
IP Address or Hostname of this device.
-
#id ⇒ Object
readonly
A unique device ID (assigned by the NSC).
-
#riskfactor ⇒ Object
readonly
User assigned risk multiplier.
-
#riskscore ⇒ Object
readonly
NeXpose risk score.
-
#site_id ⇒ Object
readonly
The site ID of this devices site.
Instance Method Summary collapse
-
#initialize(id, site_id, address, riskfactor = 1, riskscore = 0) ⇒ Device
constructor
A new instance of Device.
Constructor Details
#initialize(id, site_id, address, riskfactor = 1, riskscore = 0) ⇒ Device
Returns a new instance of Device.
1483 1484 1485 1486 1487 1488 1489 1490 |
# File 'lib/nexpose.rb', line 1483 def initialize(id, site_id, address, riskfactor=1, riskscore=0) @id = id @site_id = site_id @address = address @riskfactor = riskfactor @riskscore = riskscore end |
Instance Attribute Details
#address ⇒ Object (readonly)
IP Address or Hostname of this device
1477 1478 1479 |
# File 'lib/nexpose.rb', line 1477 def address @address end |
#id ⇒ Object (readonly)
A unique device ID (assigned by the NSC)
1473 1474 1475 |
# File 'lib/nexpose.rb', line 1473 def id @id end |
#riskfactor ⇒ Object (readonly)
User assigned risk multiplier
1479 1480 1481 |
# File 'lib/nexpose.rb', line 1479 def riskfactor @riskfactor end |
#riskscore ⇒ Object (readonly)
NeXpose risk score
1481 1482 1483 |
# File 'lib/nexpose.rb', line 1481 def riskscore @riskscore end |
#site_id ⇒ Object (readonly)
The site ID of this devices site
1475 1476 1477 |
# File 'lib/nexpose.rb', line 1475 def site_id @site_id end |