currency_quote 0.1.3 → 0.1.4

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9c53cd739f292d46b462b70e99d93f3797f41df61758104293c77f4bf8573ffc
4
- data.tar.gz: 382045e0d812adeb655fe084bb13463c9f7bb688081ec406a91d98815f55b494
3
+ metadata.gz: 612adc220b92ef9731f4542a260feed46dbd1af40d2c02ce2ca1fece1ea317dc
4
+ data.tar.gz: 25daa5f77c54fdd8f0a13a03d4f68eb5f14f6ba5f45406e7bbedba5ededb5b77
5
5
  SHA512:
6
- metadata.gz: c4fc3365c86ac13ead56a1bf3dae0dc0a57072c7806ba23d2196ff5fa9165a8afcb70dd676789a0abb0d9b8d97ae86bf24b406fbca36efaf74453754c5a3d4a3
7
- data.tar.gz: '096fe84138e2fde1b9b082658d7c6748bd8ffa4602f3de6b7e56270e78a75ced9b513da9ff35ecbc9becaf5e6eddcb6952c8365338a216e3a40feedcaf71e5c0'
6
+ metadata.gz: fc7f2763977394e81b95b57fb961c8106b7607425d4fa9de12cb10b2e1e13f54ce911bb2c72cb63f94f0b05fcbb6e97dac5290af4be0e9efbc59576b1e4e601a
7
+ data.tar.gz: '0421195e6b5f4c9f5849865acfd15efceb659a6792b87d7bd5c98010b763c1e21ee49e68f1f073b8f30cc0c2dbd1695f72f66430d23609018fcc88620bf322ff'
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- currency_quote (0.1.2)
4
+ currency_quote (0.1.3)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -14,10 +14,14 @@ class CurrencyQuote::Currency
14
14
  end
15
15
 
16
16
  def get_quotation
17
- get_dolar_quotation
18
- make_get_to_bcra
19
- get_currency_quotation
20
- return struct
17
+ if currency == "Dolar Estadounidense"
18
+ return get_dolar_quotation
19
+ else
20
+ get_dolar_quotation
21
+ make_get_to_bcra
22
+ get_currency_quotation
23
+ return struct
24
+ end
21
25
  end
22
26
 
23
27
  private
@@ -36,7 +40,7 @@ class CurrencyQuote::Currency
36
40
  index = data.index(currency)
37
41
  if index
38
42
  quote = data[index + 1].gsub(",", ".").to_f
39
- quote = 1 if quote == 0
43
+ quote = 1.0 if quote == 0
40
44
  @sell = (dolar.sell * quote).to_f
41
45
  @buy = (dolar.buy * quote).to_f
42
46
  else
@@ -1,3 +1,3 @@
1
1
  module CurrencyQuote
2
- VERSION = "0.1.3"
2
+ VERSION = "0.1.4"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: currency_quote
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Facundo A. Díaz Martínez