currency_quote 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/currency_quote/currency.rb +9 -5
- data/lib/currency_quote/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: 612adc220b92ef9731f4542a260feed46dbd1af40d2c02ce2ca1fece1ea317dc
|
4
|
+
data.tar.gz: 25daa5f77c54fdd8f0a13a03d4f68eb5f14f6ba5f45406e7bbedba5ededb5b77
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz: '
|
6
|
+
metadata.gz: fc7f2763977394e81b95b57fb961c8106b7607425d4fa9de12cb10b2e1e13f54ce911bb2c72cb63f94f0b05fcbb6e97dac5290af4be0e9efbc59576b1e4e601a
|
7
|
+
data.tar.gz: '0421195e6b5f4c9f5849865acfd15efceb659a6792b87d7bd5c98010b763c1e21ee49e68f1f073b8f30cc0c2dbd1695f72f66430d23609018fcc88620bf322ff'
|
data/Gemfile.lock
CHANGED
@@ -14,10 +14,14 @@ class CurrencyQuote::Currency
|
|
14
14
|
end
|
15
15
|
|
16
16
|
def get_quotation
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
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
|