vlatko_dawanda 2.0.0 → 2.0.1
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/README.md +15 -0
- data/lib/vlatko_dawanda/version.rb +1 -1
- 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: 8941c1dd91d8428f355f13722a7a3d4bd38250cf
|
|
4
|
+
data.tar.gz: aff6723ebcfe5f4362c042a10d343183cf4b2927
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 57032e4a89c7905b5ccd1ebe516a482068c6e970cde8e48affe1b7354ad4a1415348b99b3149126f18777c77702515e67c33c2b7d0fd4e38175cfda21daadf16
|
|
7
|
+
data.tar.gz: 15d7c8a0b77b637ba6738feb9537de655e14eea02265c948c0c5a1ef72b73ffbfa0ebe0919dae67c69ada1fed07a3ede0a88971700b9f295b4d6c504349381ea
|
data/README.md
CHANGED
|
@@ -24,6 +24,21 @@ Money.conversion_rates('EUR', {
|
|
|
24
24
|
'Bitcoin' => 0.0047
|
|
25
25
|
})
|
|
26
26
|
|
|
27
|
+
# If you wish you can configure your own Bank class where you can inherit from VlatkoDawanda::Bank and then override the parsing methods (look into the Bank class).
|
|
28
|
+
|
|
29
|
+
class DeutscheBank < VlatkoDawanda::Bank
|
|
30
|
+
|
|
31
|
+
def parse_currencies(base_currency, currencies)
|
|
32
|
+
# your own implementation
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
# But be carefull the Currency initialize expects hash as an orgument
|
|
37
|
+
|
|
38
|
+
# You can then make the default Bank to be your class
|
|
39
|
+
|
|
40
|
+
Money.default_bank = DeutscheBank.new
|
|
41
|
+
|
|
27
42
|
# Instantiate money objects (If you haven't configure a currency you can't instantiate a Money object with that currency):
|
|
28
43
|
|
|
29
44
|
fifty_eur = Money.new(50, 'EUR')
|