Module: AsciiChem::Model

Defined in:
lib/asciichem/model.rb,
lib/asciichem/model/atom.rb,
lib/asciichem/model/bond.rb,
lib/asciichem/model/name.rb,
lib/asciichem/model/node.rb,
lib/asciichem/model/text.rb,
lib/asciichem/model/group.rb,
lib/asciichem/model/formula.rb,
lib/asciichem/model/molecule.rb,
lib/asciichem/model/reaction.rb,
lib/asciichem/model/identifier.rb,
lib/asciichem/model/embedded_math.rb,
lib/asciichem/model/reaction_cascade.rb,
lib/asciichem/model/electron_configuration.rb

Overview

Semantic model. Every parse produces a tree of Model instances, and every formatter consumes the same tree. Formatters visit via double-dispatch (node.accept(formatter) -> formatter.visit_<class>), keeping both sides open for extension.

Defined Under Namespace

Classes: Atom, Bond, ElectronConfiguration, EmbeddedMath, Formula, Group, Identifier, Molecule, Name, Node, Reaction, ReactionCascade, Text