Class: ScanTemplate::Discovery
- Inherits:
-
Domain::Model
- Object
- Domain::Model
- ScanTemplate::Discovery
- Defined in:
- lib/domain/scan_template/model.rb
Defined Under Namespace
Classes: Asset, Performance, Service
Instance Attribute Summary collapse
-
#asset ⇒ Object
Returns the value of attribute asset.
-
#performance ⇒ Object
Returns the value of attribute performance.
-
#service ⇒ Object
Returns the value of attribute service.
Instance Method Summary collapse
-
#initialize(attributes = {}) ⇒ Discovery
constructor
A new instance of Discovery.
Methods inherited from Domain::Model
columns, from_csv, from_json, headers, primary_key, table_name, #to_csv, #to_hash, #to_s, view
Constructor Details
#initialize(attributes = {}) ⇒ Discovery
Returns a new instance of Discovery.
41 42 43 44 45 46 |
# File 'lib/domain/scan_template/model.rb', line 41 def initialize(attributes = {}) @asset = Asset.new(attributes[:asset]) if attributes[:asset] @performance = Performance.new(attributes[:performance]) if attributes[:performance] @service = Service.new(attributes[:service]) if attributes[:service] super(attributes) end |
Instance Attribute Details
#asset ⇒ Object
Returns the value of attribute asset.
39 40 41 |
# File 'lib/domain/scan_template/model.rb', line 39 def asset @asset end |
#performance ⇒ Object
Returns the value of attribute performance.
39 40 41 |
# File 'lib/domain/scan_template/model.rb', line 39 def performance @performance end |
#service ⇒ Object
Returns the value of attribute service.
39 40 41 |
# File 'lib/domain/scan_template/model.rb', line 39 def service @service end |