BnmAPI 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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4e807a48dfef08fab1c7ff16cbf87ef4fa4126b88db25fd89845bca0ce30b7cb
4
- data.tar.gz: 6f1a037f5240ee78464a746173d1d34a3496ffcf18890ca3cd635835524eaa80
3
+ metadata.gz: ce36e8209b58c4a626102148db4881260685bc80474e047d2a5d208ca11f6d38
4
+ data.tar.gz: d03fd8557fa540500ddbadb94f52dddb73eb18d997285498091d5158c87d62fc
5
5
  SHA512:
6
- metadata.gz: bc11fd9bc51ca071f3e1981825d8b05fb64a6da0dd8be77a35574670ba913dd113a02211445ef218b479b7566197342770c799b993f0a1ffdfc9ab25cbedef36
7
- data.tar.gz: 9a484fbdcac03ee856ed1e8b6961e835217a02bfeaaadbfd9e3087182108791070d2dd8c3ca573d6535d52679d8df673dcb9f797814fd062d78ce6497fa4bc12
6
+ metadata.gz: 2ebd4debd931b28525aeb87a4634e1d595d4f6349ad6258d7d5e7842be6c7401de6b9597e6dd7c1be55ff1fe008b5348636d2b4b01f1d1a441c11eba8ca6c3ce
7
+ data.tar.gz: e5394be3062c4485cb85e7e055b2907137b967d17bbb952b10af0c1141e9871f6d11a5faf4ecb495b14a92cff7ced9e7f6efe22f39000e788a76ff19621af11e
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- BnmAPI (0.1.0)
4
+ BnmAPI (0.1.1)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
data/README.md CHANGED
@@ -85,10 +85,16 @@ puts collection[0].base_financing_rate
85
85
  puts collection[0].base_lending_rate
86
86
  # 5.92
87
87
 
88
- puts collection[0].last_updated
89
- # 2019-02-14 11:48:23
88
+ puts collection[0].last_updated.class
89
+ # DateTime
90
90
 
91
- puts collection[0].effective_date
91
+ puts collection[0].last_updated.iso8601
92
+ # 2019-01-18T19:25:02+00:00
93
+
94
+ puts collection[0].effective_date.class
95
+ # Date
96
+
97
+ puts collection[0].effective_date.iso8601
92
98
  # 2019-04-05
93
99
  ```
94
100
 
@@ -113,10 +119,16 @@ puts bank.base_lending_rate
113
119
  puts bank.indicative_eff_lending_rate
114
120
  # 5.92
115
121
 
116
- puts bank.last_updated
117
- # 2019-01-18 19:25:02
122
+ puts bank.last_updated.class
123
+ # DateTime
124
+
125
+ puts bank.last_updated.iso8601
126
+ # 2019-01-18T19:25:02+00:00
127
+
128
+ puts bank.effective_date.class
129
+ # Date
118
130
 
119
- puts bank.effective_date
131
+ puts bank.effective_date.iso8601
120
132
  # 2019-04-05
121
133
  ```
122
134
 
@@ -9,9 +9,17 @@ module BnmAPI::Data
9
9
  :base_lending_rate,
10
10
  :base_financing_rate,
11
11
  :indicative_eff_lending_rate,
12
- :last_updated,
13
- :effective_date
12
+ :last_updated_data,
13
+ :effective_date_data
14
14
  ) do
15
15
 
16
+ def last_updated
17
+ DateTime.parse(last_updated_data)
18
+ end
19
+
20
+ def effective_date
21
+ Date.parse(effective_date_data)
22
+ end
23
+
16
24
  end
17
25
  end
@@ -1,3 +1,3 @@
1
1
  module BnmAPI
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: BnmAPI
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - J Shamsul Bahri (jibone))
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-04-07 00:00:00.000000000 Z
11
+ date: 2019-04-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler