numerolog 0.0.2 → 0.0.3
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 +4 -4
- data/lib/numerolog.rb +5 -0
- 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: aa2359cea6fea5d2f8119957cdc64ef450b9a6dd
|
|
4
|
+
data.tar.gz: d2f9d682d5eea537a50e0265ed4199de854354bf
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 4215fc10c669661079161b434bcac1a633cefd457746a318c1f785f7a495409fd02a4bf6a298103c42211f65374ad3575364d3ad73bb4f4f24cd0fe172e6858d
|
|
7
|
+
data.tar.gz: 72387ffa0478c6c2eb3a83fcaac7e2345fc3e87791f6aebd25e35d9bb16018f72f4a93f61a4d48b0c6fa907ad27bfe6467bd5fb43957b9abc76339f45ffd6bda
|
data/lib/numerolog.rb
CHANGED
|
@@ -3,7 +3,11 @@ module Numerolog
|
|
|
3
3
|
# brings numerical sum of all characters based on their position (numerology)
|
|
4
4
|
|
|
5
5
|
class << self
|
|
6
|
+
|
|
7
|
+
private
|
|
6
8
|
attr_accessor :sum
|
|
9
|
+
|
|
10
|
+
public
|
|
7
11
|
def gematria(str)
|
|
8
12
|
@sum = 0
|
|
9
13
|
str.each_char do |c|
|
|
@@ -21,6 +25,7 @@ module Numerolog
|
|
|
21
25
|
replace gematria
|
|
22
26
|
end
|
|
23
27
|
|
|
28
|
+
private
|
|
24
29
|
def sum_of_digits
|
|
25
30
|
until @sum < 10
|
|
26
31
|
@sum = @sum.to_s.split('').map(&:to_i).reduce(&:+)
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: numerolog
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.
|
|
4
|
+
version: 0.0.3
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Manohar Amrutkar
|
|
@@ -18,7 +18,7 @@ extensions: []
|
|
|
18
18
|
extra_rdoc_files: []
|
|
19
19
|
files:
|
|
20
20
|
- lib/numerolog.rb
|
|
21
|
-
homepage:
|
|
21
|
+
homepage: https://github.com/manoharaa/numerolog
|
|
22
22
|
licenses:
|
|
23
23
|
- MIT
|
|
24
24
|
metadata: {}
|