hesabu 0.1.3 → 0.1.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/hesabu/errors.rb +2 -0
- data/lib/hesabu/solver.rb +4 -0
- data/lib/hesabu/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b89b737f24684f9cc743989c0b641873653cd3bb242c74dfbfab218a17685f65
|
4
|
+
data.tar.gz: 17cd26ba5d1d309bbe4bd83b0a4cc09723b1d46b38b920c147b94f255639e810
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 81eaf12d1f76033f8c02cc1fa09e061f4af3e678ed8ac57907bee046fc1f43802ffb3ad3a4139613b49709f1ba961508846801985aef1d54c16af2c7941915f1
|
7
|
+
data.tar.gz: b454820dcbab67c1c24e3aef4402e464573edd2d8d9d35264c9a9910ad6b17424f729b33fc5a2a950415085415d1e20b7877f4e8dd10c166280d8ec0b03ea22c
|
data/Gemfile.lock
CHANGED
data/lib/hesabu/errors.rb
CHANGED
data/lib/hesabu/solver.rb
CHANGED
@@ -14,6 +14,10 @@ module Hesabu
|
|
14
14
|
end
|
15
15
|
|
16
16
|
def add(name, raw_expression)
|
17
|
+
if raw_expression.nil? || name.nil?
|
18
|
+
raise Hesabu::ArgumentError, "name or expression can't be nil : '#{name}', '#{raw_expression}'"
|
19
|
+
end
|
20
|
+
|
17
21
|
if ::Hesabu::Types.as_numeric(raw_expression)
|
18
22
|
add_numeric(name, raw_expression)
|
19
23
|
else
|
data/lib/hesabu/version.rb
CHANGED