eulim 0.0.5 → 0.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 848f2bdad4e29272b0fa072940779da4fa423ef7
4
- data.tar.gz: aa8f97a80023676fb7f984343949b033c02b2773
3
+ metadata.gz: 5a138013833764d873ab40e70b3c4b340bb8a828
4
+ data.tar.gz: 882d5ef4120fdc98084134a15292bfc8dc89acb0
5
5
  SHA512:
6
- metadata.gz: 55336a3b7f9db14cdddbe750e65871fb2f1c9982a82917a09f8f51f87da17875e97f21a5c89d7db8b019e5bb33c8be202f5bb31a2df950828a7296e92019b3d1
7
- data.tar.gz: 3a127b106a946e0f3a8f16b6e11948a8f0b8006577db9bd41b90cb8490acea3f91ce28170c2ea892675dd76fce4d9156db73e8f9ec5619951eb7a7e3f6079745
6
+ metadata.gz: 9fea25b3c5147273c8d9b66b9ccd2edbebeae7a2a39c08d2c3712229e96c5bf6aef58082a306094eb87d148ed32a304025017b628a42c3969c0b83d45b8583c2
7
+ data.tar.gz: ebb53f057e21a6f359e7954b56bce2d7a706481097d4fd3e38108210fc8e7d406d57406219287182a6e0223b5ba9bdb51430ea6d2d62c49e1c3a2f2e504b9156
data/README.md CHANGED
@@ -36,6 +36,8 @@ Or install it yourself as:
36
36
 
37
37
  #### Compound
38
38
 
39
+ * molecular_mass
40
+
39
41
  ## Usage
40
42
 
41
43
  $ Eulim::Chemistry::Element.get_by_symbol("H")
@@ -49,6 +51,9 @@ Or install it yourself as:
49
51
 
50
52
  $ Eulim::Chemistry::Compound.new("CaCO3").elements
51
53
  => [#<Eulim::Chemistry::Element: @symbol="Ca", @name="Calcium", @atomic_number=20, @atomic_mass=40.078>, #<Eulim::Chemistry::Element: @symbol="C", @name="Carbon", @atomic_number=6, @atomic_mass=12.0107>, #<Eulim::Chemistry::Element: @symbol="O", @name="Oxygen", @atomic_number=8, @atomic_mass=15.9996>]
54
+
55
+ $ Eulim::Chemistry::Compound.new("Be3Al2(SiO3)6").molecular_mass
56
+ => 537.505346
52
57
 
53
58
  ## Development
54
59
 
@@ -17,6 +17,15 @@ module Eulim::Chemistry
17
17
  mass
18
18
  end
19
19
 
20
+ def elements
21
+ elements = []
22
+ element_atom_count = get_element_atom_count
23
+ element_atom_count.each do |symbol, count|
24
+ elements << Element.get_by_symbol(symbol)
25
+ end
26
+ elements
27
+ end
28
+
20
29
  private
21
30
  def get_element_atom_count formula = @formula, group_multiplier = 1, result = {}, groups = []
22
31
  formula
data/lib/eulim/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Eulim
2
- VERSION = "0.0.5"
2
+ VERSION = "0.0.6"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: eulim
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Syed Fazil Basheer