cbr_rates 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/LICENSE.txt +1 -1
- data/README.md +20 -21
- data/examples/usd_to_cad.rb +0 -2
- data/lib/cbr_rates.rb +1 -0
- data/lib/cbr_rates/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: 6ef118de85329c5329d6413ee9907675c52f10d343d885f2b57a0ee9e8ffab5b
|
4
|
+
data.tar.gz: 977f3830d325ede3c2c7ce2fc48a65f13d952ba48d44a7f2e6bab742a1ae119e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8fb9c33c19c4ae2388d647be109b9a35a0dfe07f306ce21eae1277dbf37a396007677febe8c538e95fb0fce041feeb229eb7a437e30aa1fcc899c45ac2fd7362
|
7
|
+
data.tar.gz: c29a3c767b48b5073ed9aee04a675b8909d82ae2a580e62a477192f6ccdcad7894052bf1853e174cceada07c268208b7a2c796ac39909d685b80777c98a617dc
|
data/LICENSE.txt
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
The MIT License (MIT)
|
2
2
|
|
3
|
-
Copyright (c) 2020
|
3
|
+
Copyright (c) 2020 Eugene Zolotarev, Vadim Venediktov
|
4
4
|
|
5
5
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
6
|
of this software and associated documentation files (the "Software"), to deal
|
data/README.md
CHANGED
@@ -1,40 +1,39 @@
|
|
1
|
-
#
|
1
|
+
# Котировки валют с Банка России
|
2
2
|
|
3
|
-
|
3
|
+
## Установка
|
4
4
|
|
5
|
-
|
5
|
+
Добавьте
|
6
6
|
|
7
|
-
|
8
|
-
|
9
|
-
Add this line to your application's Gemfile:
|
10
|
-
|
11
|
-
```ruby
|
7
|
+
``` rb
|
12
8
|
gem 'cbr_rates'
|
13
9
|
```
|
14
10
|
|
15
|
-
|
11
|
+
И сделайте
|
16
12
|
|
17
|
-
|
13
|
+
bundle
|
18
14
|
|
19
|
-
|
15
|
+
Или сделайте
|
20
16
|
|
21
|
-
|
17
|
+
gem install cbr_rates
|
22
18
|
|
23
|
-
##
|
19
|
+
## Использование
|
24
20
|
|
25
|
-
|
21
|
+
``` rb
|
22
|
+
require 'cbr_rates'
|
26
23
|
|
27
|
-
|
24
|
+
usd = Money.new('1_50', 'USD')
|
28
25
|
|
29
|
-
|
26
|
+
result = CbrRates.new.exchange(usd, 'CAD')
|
30
27
|
|
31
|
-
|
28
|
+
puts "1.50 USD -> CAD: #{result.format}"
|
29
|
+
```
|
32
30
|
|
33
|
-
|
31
|
+
Как обращаться с объектом `Money` см. в [документации](https://github.com/RubyMoney/money) этого гема.
|
34
32
|
|
35
|
-
|
33
|
+
## Помочь в разработке
|
36
34
|
|
35
|
+
Шлите ваши пулреквесты в https://github.com/goodprogrammer-ru/cbr_rates.
|
37
36
|
|
38
|
-
##
|
37
|
+
## Лицензия
|
39
38
|
|
40
|
-
|
39
|
+
[MIT License](https://opensource.org/licenses/MIT)
|
data/examples/usd_to_cad.rb
CHANGED
data/lib/cbr_rates.rb
CHANGED
data/lib/cbr_rates/version.rb
CHANGED