Class: Asset
- Inherits:
-
Domain::Model
- Object
- Domain::Model
- Asset
- Defined in:
- lib/domain/asset/model.rb
Instance Attribute Summary collapse
-
#assessed_for_vulnerabilities ⇒ Object
Returns the value of attribute assessed_for_vulnerabilities.
-
#host_name ⇒ Object
Returns the value of attribute host_name.
-
#id ⇒ Object
Returns the value of attribute id.
-
#ip ⇒ Object
Returns the value of attribute ip.
-
#mac ⇒ Object
Returns the value of attribute mac.
-
#os ⇒ Object
Returns the value of attribute os.
-
#os_certainty ⇒ Object
Returns the value of attribute os_certainty.
-
#risk_score ⇒ Object
Returns the value of attribute risk_score.
-
#type ⇒ Object
Returns the value of attribute type.
-
#vulnerabilities ⇒ Object
Returns the value of attribute vulnerabilities.
Class Method Summary collapse
Methods inherited from Domain::Model
columns, from_csv, headers, #initialize, primary_key, table_name, #to_csv, #to_hash, #to_s, view
Constructor Details
This class inherits a constructor from Domain::Model
Instance Attribute Details
#assessed_for_vulnerabilities ⇒ Object
Returns the value of attribute assessed_for_vulnerabilities.
6 7 8 |
# File 'lib/domain/asset/model.rb', line 6 def assessed_for_vulnerabilities @assessed_for_vulnerabilities end |
#host_name ⇒ Object
Returns the value of attribute host_name.
6 7 8 |
# File 'lib/domain/asset/model.rb', line 6 def host_name @host_name end |
#id ⇒ Object
Returns the value of attribute id.
6 7 8 |
# File 'lib/domain/asset/model.rb', line 6 def id @id end |
#ip ⇒ Object
Returns the value of attribute ip.
6 7 8 |
# File 'lib/domain/asset/model.rb', line 6 def ip @ip end |
#mac ⇒ Object
Returns the value of attribute mac.
6 7 8 |
# File 'lib/domain/asset/model.rb', line 6 def mac @mac end |
#os ⇒ Object
Returns the value of attribute os.
6 7 8 |
# File 'lib/domain/asset/model.rb', line 6 def os @os end |
#os_certainty ⇒ Object
Returns the value of attribute os_certainty.
6 7 8 |
# File 'lib/domain/asset/model.rb', line 6 def os_certainty @os_certainty end |
#risk_score ⇒ Object
Returns the value of attribute risk_score.
6 7 8 |
# File 'lib/domain/asset/model.rb', line 6 def risk_score @risk_score end |
#type ⇒ Object
Returns the value of attribute type.
6 7 8 |
# File 'lib/domain/asset/model.rb', line 6 def type @type end |
#vulnerabilities ⇒ Object
Returns the value of attribute vulnerabilities.
6 7 8 |
# File 'lib/domain/asset/model.rb', line 6 def vulnerabilities @vulnerabilities end |
Class Method Details
.from_json(data) ⇒ Object
9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/domain/asset/model.rb', line 9 def self.from_json(data) new( id: data['id'], host_name: data['hostName'], ip: data['ip'], mac: data['mac'], os: data['os'], os_certainty: data['osCertainty'], type: data['type'], risk_score: data['riskScore'], assessed_for_vulnerabilities: data['assessedForVulnerabilities'], vulnerabilities: data['vulnerabilities'] ) end |