bitex 0.2.3 → 0.2.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/bitex/rates.rb +2 -0
- data/lib/bitex/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 690587a59ef5bca1f6eb9a8779b3f294789a51fb
|
4
|
+
data.tar.gz: 01ad7c94e7b44819dc9b5c4d29039b394be05dd2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 165164cc0ca8cdaf2f74582245f94ed82eff727bb70664b22383cfb95a629fc8fc3536316984213e0c842ff26f1ec707d8ac4ad192f02717eea89f51f927588e
|
7
|
+
data.tar.gz: 110ba8f89ec2a0f41d9a76f5423f42afba14b8903b5ee7472e7d581c42632566b6ffbbb285b3b8cbe01b043940f4c50dd59b9a3f6085289667ad285d777f9568
|
data/lib/bitex/rates.rb
CHANGED
@@ -26,6 +26,7 @@ module Bitex
|
|
26
26
|
def self.calculate_path(value, path)
|
27
27
|
value = value.to_d
|
28
28
|
path_to_calculator(path).each do |step|
|
29
|
+
step.symbolize_keys!
|
29
30
|
case step[:type].to_sym
|
30
31
|
when :exchange
|
31
32
|
value *= step[:rate].to_d
|
@@ -43,6 +44,7 @@ module Bitex
|
|
43
44
|
def self.calculate_path_backwards(path, value)
|
44
45
|
value = value.to_d
|
45
46
|
path_to_calculator(path).each do |step|
|
47
|
+
step.symbolize_keys!
|
46
48
|
case step[:type].to_sym
|
47
49
|
when :exchange
|
48
50
|
value /= step[:rate].to_d
|
data/lib/bitex/version.rb
CHANGED