nuffle 1.0.0 → 1.0.1
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/nuffle.rb +2 -2
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4eecab3db6715a2dfa261097801171ae750866b5
|
4
|
+
data.tar.gz: 858aa0b8393f1d146d5ad6e79ff970c20511b0fb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 687663b57e7c783f815ba116623b539ee4be13c20c2033b6dc68115378f27d2297b23c30a3d0b16cd70441c242a9f78fa27f46f5101a96e0060533dc8ba55f0b
|
7
|
+
data.tar.gz: 41b6edda9b7901f82a315e65f56f021d9b8f7fffdbac1ef66aaaa2330e1314bc25c76c8cdbf3893288a5514986bfbe468d9800f4b406f845454da3bf3cf2a739
|
data/lib/nuffle.rb
CHANGED
@@ -21,7 +21,7 @@ class Nuffle::Calculator
|
|
21
21
|
@rolls = []
|
22
22
|
|
23
23
|
# throw rolls and replace 'xdy' dice notation with results
|
24
|
-
@equation = @input.gsub(/(\d+)d(\d+)/) do |match|
|
24
|
+
@equation = @input.gsub(/(\d+)d(\d+)/i) do |match|
|
25
25
|
rolls = []
|
26
26
|
|
27
27
|
(1..$1.to_i).each do
|
@@ -91,4 +91,4 @@ class Nuffle::Calculator
|
|
91
91
|
|
92
92
|
return balance === 0
|
93
93
|
end
|
94
|
-
end
|
94
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: nuffle
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Zachary Flower
|
@@ -52,7 +52,9 @@ dependencies:
|
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '0'
|
55
|
-
description:
|
55
|
+
description: 'Nuffle, The Ruby Library, is a dice calculator library that provides
|
56
|
+
the functionality to perform complex dice rolls and calculate their result (ex:
|
57
|
+
`5d6 + 1d20 / (1d6 - 2)`.'
|
56
58
|
email: zach@zacharyflower.com
|
57
59
|
executables: []
|
58
60
|
extensions: []
|