Class: AsciiChem::Model::Identifier
- Inherits:
-
Struct
- Object
- Struct
- AsciiChem::Model::Identifier
- Defined in:
- lib/asciichem/model/identifier.rb
Overview
A molecule identifier. Maps to CML <identifier> element.
Carries the identifier value plus convention (e.g. "inchi",
"smiles", "cas") and optional dict_ref.
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
Instance Attribute Details
#convention ⇒ Object
Returns the value of attribute convention
8 9 10 |
# File 'lib/asciichem/model/identifier.rb', line 8 def convention @convention end |
#dict_ref ⇒ Object
Returns the value of attribute dict_ref
8 9 10 |
# File 'lib/asciichem/model/identifier.rb', line 8 def dict_ref @dict_ref end |
#value ⇒ Object
Returns the value of attribute value
8 9 10 |
# File 'lib/asciichem/model/identifier.rb', line 8 def value @value end |
Instance Method Details
#to_s ⇒ Object
9 10 11 |
# File 'lib/asciichem/model/identifier.rb', line 9 def to_s "#{convention}:#{value}" end |