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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c0f409f2edf134480559d42b2a79d57a09d4fefa
4
- data.tar.gz: 198bf2f788ea24c148c947e5f01d2c17d96747e8
3
+ metadata.gz: 690587a59ef5bca1f6eb9a8779b3f294789a51fb
4
+ data.tar.gz: 01ad7c94e7b44819dc9b5c4d29039b394be05dd2
5
5
  SHA512:
6
- metadata.gz: 85597c781f7eb8ef612dca37f546593ad453d8ebb507e3b2f7a6e63196c4cc9fdbf17eba2ac4cc76c3d400ba843956ff3e01557c9b869b24b052ae1ab4dd674c
7
- data.tar.gz: 9fb13004f9956c6a4b449d3e844e43cd6c001d5e2a7c24c944186cbeb897689432814263c9fab0cda314da5dde75a85581e64d9fd232d1aad862860572a75a91
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
@@ -1,3 +1,3 @@
1
1
  module Bitex
2
- VERSION = "0.2.3"
2
+ VERSION = "0.2.4"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bitex
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.3
4
+ version: 0.2.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nubis