elementic 1.0.1 → 1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +16 -23
- data/lib/elementic/periodic_table.rb +19 -16
- data/lib/elementic/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 02b8014482ef2cad4861892bb4a838a4b7064ceb
|
4
|
+
data.tar.gz: 4fbcfd8b9b6dbb602380c600aebddbaa0c45f177
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ded51271c0e9486f1a1591fb9488441d8bcaae4953a45fccc55ccc10357ea578d0d4de3c958763efe1f52d16a0341f72717b76dff45217159304dd1f53477bd3
|
7
|
+
data.tar.gz: 7d47d79ee635a3d4a40e7ced3f1f8b74d83129c15e6a23c38d43a942e8e7dde3564f4f05ec7687260fb0ef82fa22e775f850d8c1745eabed9bde83548628cfb3
|
data/README.md
CHANGED
@@ -1,31 +1,24 @@
|
|
1
|
-
|
1
|
+
elementic
|
2
|
+
=========
|
2
3
|
|
3
|
-
|
4
|
-
|
5
|
-
|
4
|
+
```bash
|
5
|
+
$ gem install elementic
|
6
|
+
```
|
6
7
|
|
7
|
-
|
8
|
+
and then use the module and stuff
|
8
9
|
|
9
10
|
```ruby
|
10
|
-
|
11
|
+
require 'elementic'
|
12
|
+
Elements::HYDROGEN.ion_charges #[+1, -1]
|
13
|
+
Elements::HELIUM.symbol #He
|
14
|
+
Elements::LITHIUM.name #Lithium
|
15
|
+
Elements::BERYLLIUM.atomic_number #4
|
11
16
|
```
|
12
17
|
|
13
|
-
|
14
|
-
|
15
|
-
$ bundle
|
16
|
-
|
17
|
-
Or install it yourself as:
|
18
|
+
and ecetera ecetera
|
18
19
|
|
19
|
-
|
20
|
+
or grab the version
|
20
21
|
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
## Contributing
|
26
|
-
|
27
|
-
1. Fork it ( https://github.com/[my-github-username]/elementic/fork )
|
28
|
-
2. Create your feature branch (`git checkout -b my-new-feature`)
|
29
|
-
3. Commit your changes (`git commit -am 'Add some feature'`)
|
30
|
-
4. Push to the branch (`git push origin my-new-feature`)
|
31
|
-
5. Create a new Pull Request
|
22
|
+
```bash
|
23
|
+
Elementic::VERSION # some version, idk i'm not going to update this every time there's a new version
|
24
|
+
```
|
@@ -1,19 +1,22 @@
|
|
1
1
|
require_relative 'element'
|
2
|
-
$hydrogen = Element.new(
|
3
|
-
name:'Hydrogen', symbol:'H', ion_charges:[+1, -1],
|
4
|
-
atomic_number:1, atomic_mass:1.0
|
5
|
-
)
|
6
|
-
$helium = Element.new(
|
7
|
-
name: 'Helium', symbol:'He', ion_charges:[],
|
8
|
-
atomic_number:2, atomic_mass:4.0
|
9
|
-
)
|
10
2
|
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
3
|
+
module Elements
|
4
|
+
HYDROGEN = Element.new(
|
5
|
+
name:'Hydrogen', symbol:'H', ion_charges:[+1, -1],
|
6
|
+
atomic_number:1, atomic_mass:1.0
|
7
|
+
)
|
8
|
+
HELIUM = Element.new(
|
9
|
+
name: 'Helium', symbol:'He', ion_charges:[],
|
10
|
+
atomic_number:2, atomic_mass:4.0
|
11
|
+
)
|
15
12
|
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
)
|
13
|
+
LITHIUM = Element.new(
|
14
|
+
name: 'Lithium', symbol: 'Li', ion_charges:[+1],
|
15
|
+
atomic_number:3, atomic_mass:6.9
|
16
|
+
)
|
17
|
+
|
18
|
+
BERYLLIUM = Element.new(
|
19
|
+
name: 'Beryllium', symbol: 'Be', ion_charges:[+2],
|
20
|
+
atomic_number:4, atomic_mass:9.0
|
21
|
+
)
|
22
|
+
end
|
data/lib/elementic/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: elementic
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: '1.1'
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Josh
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-11-
|
11
|
+
date: 2014-11-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|