Class: Chemicalml::Model::Label
- Defined in:
- lib/chemicalml/model/label.rb
Overview
A string label with a dict_ref pointing to a dictionary entry.
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.
-
#value ⇒ Object
Returns the value of attribute value.
Instance Method Summary collapse
-
#initialize(value:, dict_ref:, id: nil, convention: nil) ⇒ Label
constructor
A new instance of Label.
- #value_attributes ⇒ Object
Methods inherited from Node
#==, #accept, #children, #hash, short_name
Constructor Details
#initialize(value:, dict_ref:, id: nil, convention: nil) ⇒ Label
Returns a new instance of Label.
9 10 11 12 13 14 |
# File 'lib/chemicalml/model/label.rb', line 9 def initialize(value:, dict_ref:, id: nil, convention: nil) @value = value @dict_ref = dict_ref @id = id @convention = convention end |
Instance Attribute Details
#convention ⇒ Object
Returns the value of attribute convention.
7 8 9 |
# File 'lib/chemicalml/model/label.rb', line 7 def convention @convention end |
#dict_ref ⇒ Object
Returns the value of attribute dict_ref.
7 8 9 |
# File 'lib/chemicalml/model/label.rb', line 7 def dict_ref @dict_ref end |
#id ⇒ Object
Returns the value of attribute id.
7 8 9 |
# File 'lib/chemicalml/model/label.rb', line 7 def id @id end |
#value ⇒ Object
Returns the value of attribute value.
7 8 9 |
# File 'lib/chemicalml/model/label.rb', line 7 def value @value end |
Instance Method Details
#value_attributes ⇒ Object
16 17 18 |
# File 'lib/chemicalml/model/label.rb', line 16 def value_attributes { value: value, dict_ref: dict_ref, id: id, convention: convention } end |