fx_fetcher 0.0.1 → 0.0.2
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 +4 -4
- data/lib/fx_fetcher/version.rb +1 -1
- data/lib/fx_fetcher.rb +2 -0
- 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: fb55735ff3c285ce9dd9a00b4ea34d92c5af8186
|
4
|
+
data.tar.gz: 8e3a18734448b9b1fe50cc88e694d8d510fd896e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f32068257a70c84e8d5d1e1c548d285d48ca82212f2299e9589652d7ad632150363bc05f50e069926e72dd63ae285133472a315054c3afa703c2637bf50e2525
|
7
|
+
data.tar.gz: 3fe911da29357435a7324515e81c00cd3eea5ebbcdf80cb3fa36f602384caa6cdb6646a70fa27be9e3ed5d7c53dfe3f877f97825db7e1a745d36c0f90c3aa552
|
data/lib/fx_fetcher/version.rb
CHANGED
data/lib/fx_fetcher.rb
CHANGED
@@ -14,6 +14,7 @@ module FxFetcher
|
|
14
14
|
end
|
15
15
|
end
|
16
16
|
|
17
|
+
# helper to create list of available currencies
|
17
18
|
def currencies
|
18
19
|
currencies = []
|
19
20
|
rates_for_date = self.where(rate_date: self.first.rate_date)
|
@@ -21,6 +22,7 @@ module FxFetcher
|
|
21
22
|
currencies << rates_for_date.first.base_currency
|
22
23
|
end
|
23
24
|
|
25
|
+
# helper to check if value is non text and greater than zero
|
24
26
|
def valid_amount?(amount)
|
25
27
|
amount.to_f > 0.0
|
26
28
|
end
|