Class: Chemicalml::Model::Name

Inherits:
Node
  • Object
show all
Defined in:
lib/chemicalml/model/name.rb

Overview

A molecule name. The convention field tags the naming scheme (e.g. "iupac:systematic", "trivial").

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Node

#==, #accept, #children, #hash, short_name

Constructor Details

#initialize(content:, convention: nil, dict_ref: nil) ⇒ Name

Returns a new instance of Name.



10
11
12
13
14
# File 'lib/chemicalml/model/name.rb', line 10

def initialize(content:, convention: nil, dict_ref: nil)
  @content = content
  @convention = convention
  @dict_ref = dict_ref
end

Instance Attribute Details

#contentObject

Returns the value of attribute content.



8
9
10
# File 'lib/chemicalml/model/name.rb', line 8

def content
  @content
end

#conventionObject

Returns the value of attribute convention.



8
9
10
# File 'lib/chemicalml/model/name.rb', line 8

def convention
  @convention
end

#dict_refObject

Returns the value of attribute dict_ref.



8
9
10
# File 'lib/chemicalml/model/name.rb', line 8

def dict_ref
  @dict_ref
end

Instance Method Details

#value_attributesObject



16
17
18
# File 'lib/chemicalml/model/name.rb', line 16

def value_attributes
  { content: content, convention: convention, dict_ref: dict_ref }
end