Chem::Element
Inherits Reference / Object
Instance methods
atomic_number
Sourcecovalent_radius
Sourceheavy?
Sourcemass
Sourcemax_bonds
Sourcemax_valence
Sourcename
Sourcesymbol
Sourcetarget_electrons(valence : Int32) : Int32
Returns the total number of electrons in the valence shell.
This method follows the octet rule (duet for hydrogen and helium), accounting for the expanded octet in the cases of phosphorus, sulfur, etc.
target_valence(effective_valence : Int) : Int32
Returns the target valence given the effective valence. This is useful for multi-valent elements (e.g., sulfur, phosphorus).
to_s(io : IO) : Nil
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>
valence
Sourcevalence_electrons
Sourcevalences
Sourcevdw_radius
Source