Class: Chem::KEGG::KCFAtom
Instance Attribute Summary collapse
-
#atom_id ⇒ Object
Returns the value of attribute atom_id.
-
#kcf_type ⇒ Object
Returns the value of attribute kcf_type.
-
#next_atom ⇒ Object
Returns the value of attribute next_atom.
Attributes included from Atom
Instance Method Summary collapse
- #element ⇒ Object
-
#initialize(line) ⇒ KCFAtom
constructor
A new instance of KCFAtom.
- #x ⇒ Object
- #y ⇒ Object
Methods included from Atom
Constructor Details
#initialize(line) ⇒ KCFAtom
Returns a new instance of KCFAtom.
24 25 26 27 |
# File 'lib/chem/db/kcf.rb', line 24 def initialize line @line = line @next_atom = {} end |
Instance Attribute Details
#atom_id ⇒ Object
Returns the value of attribute atom_id.
22 23 24 |
# File 'lib/chem/db/kcf.rb', line 22 def atom_id @atom_id end |
#kcf_type ⇒ Object
Returns the value of attribute kcf_type.
22 23 24 |
# File 'lib/chem/db/kcf.rb', line 22 def kcf_type @kcf_type end |
#next_atom ⇒ Object
Returns the value of attribute next_atom.
22 23 24 |
# File 'lib/chem/db/kcf.rb', line 22 def next_atom @next_atom end |
Instance Method Details
#element ⇒ Object
33 |
# File 'lib/chem/db/kcf.rb', line 33 def element ; @element || @element = @line[19...22].strip.intern ; end |
#x ⇒ Object
29 |
# File 'lib/chem/db/kcf.rb', line 29 def x ; @x || @x = @line[22...32].to_f ; end |
#y ⇒ Object
30 |
# File 'lib/chem/db/kcf.rb', line 30 def y ; @y || @y = @line[32...42].to_f ; end |