class Chem::Templates::Atom
- Chem::Templates::Atom
- Reference
- Object
Defined in:
chem/templates/atom.crConstructors
- .new(name : String, element : Element, bonded_elements : Array(Element), formal_charge : Int32 = 0, valence : Int32 | Nil = nil)
- .new(name : String, top_spec : String, formal_charge : Int32 = 0, valence : Int32 | Nil = nil) : self
Instance Method Summary
- #bonded_elements : Array::View(Element)
- #element : Element
- #formal_charge : Int32
- #name : String
- #suffix : String | Nil
-
#to_s(io : IO)
Appends a short String representation of this object which includes its class name and its object address.
- #top_spec : String
- #valence : Int32 | Nil
Constructor Detail
def self.new(name : String, element : Element, bonded_elements : Array(Element), formal_charge : Int32 = 0, valence : Int32 | Nil = nil)
#
def self.new(name : String, top_spec : String, formal_charge : Int32 = 0, valence : Int32 | Nil = nil) : self
#
Instance Method Detail
def to_s(io : IO)
#
Description copied from class Reference
Appends a short String representation of this object which includes its class name and its object address.
class Person
def initialize(@name : String, @age : Int32)
end
end
Person.new("John", 32).to_s # => #<Person:0x10a199f20>