class Molecular::Compound
Calling Molecular.compound
returns an instance of Molecular::Compound
Public Class Methods
new(atoms)
click to toggle source
# File lib/molecular.rb, line 22 def initialize(atoms) @atoms = atoms end
Public Instance Methods
call(atoms)
click to toggle source
# File lib/molecular.rb, line 30 def call(atoms) self.class.new(@atoms.merge(atoms)) end
to_s()
click to toggle source
# File lib/molecular.rb, line 26 def to_s @atoms.values.compact.join(' ') end