Class: Chemicalml::Model::Parameter
- Defined in:
- lib/chemicalml/model/parameter.rb
Overview
An input parameter — same shape as Property, used for inputs.
Instance Attribute Summary collapse
-
#convention ⇒ Object
Returns the value of attribute convention.
-
#dict_ref ⇒ Object
Returns the value of attribute dict_ref.
-
#id ⇒ Object
Returns the value of attribute id.
-
#title ⇒ Object
Returns the value of attribute title.
-
#value ⇒ Object
Returns the value of attribute value.
Instance Method Summary collapse
- #children ⇒ Object
-
#initialize(value:, dict_ref:, id: nil, title: nil, convention: nil) ⇒ Parameter
constructor
A new instance of Parameter.
- #value_attributes ⇒ Object
Methods inherited from Node
#==, #accept, #hash, short_name
Constructor Details
#initialize(value:, dict_ref:, id: nil, title: nil, convention: nil) ⇒ Parameter
Returns a new instance of Parameter.
9 10 11 12 13 14 15 |
# File 'lib/chemicalml/model/parameter.rb', line 9 def initialize(value:, dict_ref:, id: nil, title: nil, convention: nil) @value = value @dict_ref = dict_ref @id = id @title = title @convention = convention end |
Instance Attribute Details
#convention ⇒ Object
Returns the value of attribute convention.
7 8 9 |
# File 'lib/chemicalml/model/parameter.rb', line 7 def convention @convention end |
#dict_ref ⇒ Object
Returns the value of attribute dict_ref.
7 8 9 |
# File 'lib/chemicalml/model/parameter.rb', line 7 def dict_ref @dict_ref end |
#id ⇒ Object
Returns the value of attribute id.
7 8 9 |
# File 'lib/chemicalml/model/parameter.rb', line 7 def id @id end |
#title ⇒ Object
Returns the value of attribute title.
7 8 9 |
# File 'lib/chemicalml/model/parameter.rb', line 7 def title @title end |
#value ⇒ Object
Returns the value of attribute value.
7 8 9 |
# File 'lib/chemicalml/model/parameter.rb', line 7 def value @value end |
Instance Method Details
#children ⇒ Object
17 18 19 |
# File 'lib/chemicalml/model/parameter.rb', line 17 def children [value].compact end |
#value_attributes ⇒ Object
21 22 23 24 |
# File 'lib/chemicalml/model/parameter.rb', line 21 def value_attributes { id: id, title: title, dict_ref: dict_ref, convention: convention, value: value } end |