Module: Chemistry::Element
- Extended by:
- Element
- Included in:
- Element
- Defined in:
- lib/chemistry/element.rb,
lib/chemistry/element/atom.rb,
lib/chemistry-element/version.rb
Defined Under Namespace
Classes: Atom
Constant Summary collapse
- VERSION =
"1.0.0"
Instance Method Summary collapse
Instance Method Details
#define(name, &definition) ⇒ Object
7 8 9 10 11 12 13 |
# File 'lib/chemistry/element.rb', line 7 def define(name, &definition) if block_given? create_element_class(name).instance_eval &definition else raise ArgumentError, "`element` must be given a block" end end |