Class: Chemicalml::Model::Identifier
- Defined in:
- lib/chemicalml/model/identifier.rb
Overview
An external identifier: InChI, SMILES, CAS-RN, etc. The
convention field tags the identifier kind.
Instance Attribute Summary collapse
-
#convention ⇒ Object
Returns the value of attribute convention.
-
#dict_ref ⇒ Object
Returns the value of attribute dict_ref.
-
#value ⇒ Object
Returns the value of attribute value.
Instance Method Summary collapse
-
#initialize(value:, convention: nil, dict_ref: nil) ⇒ Identifier
constructor
A new instance of Identifier.
- #value_attributes ⇒ Object
Methods inherited from Node
#==, #accept, #children, #hash, short_name
Constructor Details
#initialize(value:, convention: nil, dict_ref: nil) ⇒ Identifier
Returns a new instance of Identifier.
10 11 12 13 14 |
# File 'lib/chemicalml/model/identifier.rb', line 10 def initialize(value:, convention: nil, dict_ref: nil) @value = value @convention = convention @dict_ref = dict_ref end |
Instance Attribute Details
#convention ⇒ Object
Returns the value of attribute convention.
8 9 10 |
# File 'lib/chemicalml/model/identifier.rb', line 8 def convention @convention end |
#dict_ref ⇒ Object
Returns the value of attribute dict_ref.
8 9 10 |
# File 'lib/chemicalml/model/identifier.rb', line 8 def dict_ref @dict_ref end |
#value ⇒ Object
Returns the value of attribute value.
8 9 10 |
# File 'lib/chemicalml/model/identifier.rb', line 8 def value @value end |
Instance Method Details
#value_attributes ⇒ Object
16 17 18 |
# File 'lib/chemicalml/model/identifier.rb', line 16 def value_attributes { value: value, convention: convention, dict_ref: dict_ref } end |