class Flowckerc::Molecule

Attributes

atoms[RW]

Public Class Methods

new() click to toggle source
# File lib/flowckerc/tokens.rb, line 74
def initialize
  @atoms = []
  @links = []
end

Public Instance Methods

toHash() click to toggle source
# File lib/flowckerc/tokens.rb, line 79
def toHash
  res = {}
  res[:atoms] = @atoms.map do |atom|
    atom.toHash
  end

  res[:links] = @links.map do |link|
    link.toHash
  end
  res
end