active_currency 0.3.0 → 0.4.0

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: 0d368ebfd81510032ab25fce067b42c55823cf23
4
- data.tar.gz: 1bb534e253f5b4b480936ea3a1f7a194632f9d24
3
+ metadata.gz: 56f6adecbe4588cdec72671119078133df0cb4bc
4
+ data.tar.gz: 03425c4a136c196d0776d8160e8a7b9c0c4c66e6
5
5
  SHA512:
6
- metadata.gz: 2f5cb10a9550211a5b590b85d181829a9cf72353364dfd3b63359acda79d9535d1c829c4ddb96669c76124f082bf3298d26286a17d0e181747ec19db670490bb
7
- data.tar.gz: 9b404f2d1ce3313ecc733635f6cf0b499bcfc2cf802622aae4f9ba2bf2ac1c8d3d84f6b92e33dfb41c8eef8c1d31ce56e0035d52e91c67275720688335560738
6
+ metadata.gz: fde85398d3c49aa68f1ed012025f443bc47a43ef5ed513670c4ce679ba4eec9c1aa460e256d1ac4125b69fb6fe8f5412536601828f5257bbc1b897933ecc7688
7
+ data.tar.gz: 566f5c432f78da8151db7d5ed9ed81e83c1e6cdba28999f42a15eed930fc750f21606d9b77a8e8982b54f81ec7369cc7ff91c54c3709cc7375ce706933f8fc64
@@ -16,8 +16,8 @@ module ActiveCurrency
16
16
  next if to == from
17
17
 
18
18
  rate = bank.get_rate(from, to)
19
- Money.add_rate(from, to, rate)
20
- Money.add_rate(to, from, 1 / rate)
19
+ store.add_rate(from, to, rate)
20
+ store.add_rate(to, from, 1 / rate)
21
21
  end
22
22
  end
23
23
 
@@ -26,5 +26,9 @@ module ActiveCurrency
26
26
  def currencies
27
27
  @currencies.map(&:to_s).map(&:upcase)
28
28
  end
29
+
30
+ def store
31
+ @store ||= ActiveCurrency::RateStore.new
32
+ end
29
33
  end
30
34
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ActiveCurrency
4
- VERSION = '0.3.0'
4
+ VERSION = '0.4.0'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: active_currency
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sunny Ripert