Class: AsciiChem::Model::Name

Inherits:
Struct
  • Object
show all
Defined in:
lib/asciichem/model/name.rb

Overview

A molecule name. Maps to CML <name> element. Carries the name content plus optional convention and dict_ref attributes for names sourced from dictionaries (IUPAC, CAS, trivial, etc.).

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#contentObject

Returns the value of attribute content

Returns:

  • (Object)

    the current value of content



9
10
11
# File 'lib/asciichem/model/name.rb', line 9

def content
  @content
end

#conventionObject

Returns the value of attribute convention

Returns:

  • (Object)

    the current value of convention



9
10
11
# File 'lib/asciichem/model/name.rb', line 9

def convention
  @convention
end

#dict_refObject

Returns the value of attribute dict_ref

Returns:

  • (Object)

    the current value of dict_ref



9
10
11
# File 'lib/asciichem/model/name.rb', line 9

def dict_ref
  @dict_ref
end

Instance Method Details

#to_sObject



10
11
12
# File 'lib/asciichem/model/name.rb', line 10

def to_s
  content.to_s
end