fixer-rb 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +5 -2
- data/lib/extensions/open_struct/format.rb +9 -0
- data/lib/fixer.rb +3 -0
- data/lib/fixer/version.rb +1 -1
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6e827f1480943b3021ebdefcc8858f475193193b
|
4
|
+
data.tar.gz: cd10edf021724191102931fdd7eaf25c1f9d90a1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cd02f8e6fb8c66a9f8db1ab8913de42abf0ec07cf87b4243b583d2564dde8a8637ff67af5108bc72f6da5561878c088fc646589174e75b0d3bf254a12e81603a
|
7
|
+
data.tar.gz: 933a9486b24174674a0fd2f4243e326467c1b528c5d4b042853a1f15d8612a82e54f0514d46df057401039dec5919ad15e54fdd8361fe388551ab3278b0e09b5
|
data/README.md
CHANGED
@@ -20,13 +20,16 @@ require 'fixer'
|
|
20
20
|
fixer = Fixer::Request.new 'CNY'
|
21
21
|
params = {target: 'USD', ammount: 1000}
|
22
22
|
|
23
|
-
fixer.transfer(params)
|
23
|
+
fixer.transfer(params) # 149.75
|
24
24
|
$ 149.75
|
25
25
|
```
|
26
26
|
|
27
|
+
Get currency rate
|
27
28
|
```
|
28
29
|
fixer.get_rate do |rate|
|
29
|
-
rate.USD
|
30
|
+
usd = rate.USD # 0.14975
|
31
|
+
rate_in_hash = rate.to_h
|
32
|
+
rate_in_json = rate.to_json
|
30
33
|
end
|
31
34
|
|
32
35
|
$ 0.14975
|
data/lib/fixer.rb
CHANGED
data/lib/fixer/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fixer-rb
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Taff Gao
|
@@ -83,6 +83,7 @@ files:
|
|
83
83
|
- bin/console
|
84
84
|
- bin/setup
|
85
85
|
- fixer.gemspec
|
86
|
+
- lib/extensions/open_struct/format.rb
|
86
87
|
- lib/fixer.rb
|
87
88
|
- lib/fixer/request.rb
|
88
89
|
- lib/fixer/version.rb
|