world_time_api 0.1.5 → 0.1.6

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f1caefbff303c95164ef8362c0f17875fdc9de8d1d9e7cae5ca82149cf331519
4
- data.tar.gz: 14fc08778ed1ebf48cdc920b1dbcf48b86aa903f84f5d12abc7ac042069cd1ee
3
+ metadata.gz: bcf03c453c0813a9ed196465c727bb8b283abdfe662a898d1f4082b544945eb1
4
+ data.tar.gz: f9ed297008041b3a897435eaab3deea90a000e7e5f01ec34036ed7aaa3c0c704
5
5
  SHA512:
6
- metadata.gz: a5bce2eee4fddce4edda4394270bcde59402b679f740b867f8b4adbef99864bae4339cc182fdb015aca3ceb4e250e66640283788e9e4500c4f99ade512fe328a
7
- data.tar.gz: a906439a67b6bb5f73c36c596dcf33d5437537de954b85d99d5da38f00aab366dbac9a734d2d71e01ac7def7669fc561b97a106855a9ac53122902fecb8b653c
6
+ metadata.gz: 77544f929d9e513fab31fff312c9b5853d237348226e6c56df50ad5cbe7404ae87c90bfb9336188ab57b1a7f06f88585a170b1001fffbcde7afa3b134541953b
7
+ data.tar.gz: d89cbfae24e89e680fbf6142f04ff4fc3272813a5e36b09544fd82a01873e91db5bd4a3bf17d8aff438143b51cccc7d182c20fd0365708716728301410710814
data/CHANGELOG.md CHANGED
@@ -1,21 +1,31 @@
1
1
  ## [WorldTimeAPi]
2
2
 
3
- ## [0.1.0] - 2021-11-22
3
+ ## [0.1.6] - 2025-11-20
4
4
 
5
- - Initial release
5
+ * Add automatic retry mechanism (up to 3 attempts) for failed requests
6
+ * Add exponential backoff between retry attempts
7
+ * Add configurable max_retries parameter
6
8
 
7
- ## [0.1.1] - 2021-11-22
9
+ ## [0.1.5] - 2023-02-12
8
10
 
9
- - add methods :time and :timezones
11
+ * Previous improvements
10
12
 
11
- ## [0.1.2] - 2023-02-06
13
+ ## [0.1.4] - 2023-02-12
12
14
 
13
- - Fix response
15
+ * Refactor code
14
16
 
15
17
  ## [0.1.3] - 2023-02-12
16
18
 
17
19
  * add new method :client_ip
18
20
 
19
- ## [0.1.4] - 2023-02-12
21
+ ## [0.1.2] - 2023-02-06
20
22
 
21
- * Refactor code
23
+ * Fix response
24
+
25
+ ## [0.1.1] - 2021-11-22
26
+
27
+ * add methods :time and :timezones
28
+
29
+ ## [0.1.0] - 2021-11-22
30
+
31
+ * Initial release
data/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  [![Gem Version](https://badge.fury.io/rb/world_time_api.svg)](https://badge.fury.io/rb/world_time_api)
4
4
 
5
- Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/world_time_api`. To experiment with that code, run `bin/console` for an interactive prompt.
5
+ A Ruby wrapper for the World Time API.
6
6
 
7
7
  ## Installation
8
8
 
@@ -26,14 +26,22 @@ gem install world_time_api
26
26
 
27
27
  ## Usage
28
28
 
29
+ ### List timezones
30
+
29
31
  ```ruby
30
- WorldTimeApi::Timezones.call # list timezones
32
+ WorldTimeApi::Timezones.call
33
+ ```
34
+
35
+ ### Get time by timezone
31
36
 
32
- WorldTimeApi::Time.call(time_zone) # get datetime of the timezone
37
+ ```ruby
38
+ WorldTimeApi::Time.call('Europe/London')
39
+ ```
33
40
 
34
- WorldTimeApi::ClientIp.call # get datetime by your client ip
41
+ ### Get time by IP address
35
42
 
36
- WorldTimeApi::ClientIp.call(ip_address) # get datatime by ip address
43
+ ```ruby
44
+ WorldTimeApi::ClientIp.call('12.215.42.19')
37
45
  ```
38
46
 
39
47
  ## Development
@@ -6,7 +6,7 @@
6
6
  <title>
7
7
  Module: WorldTimeApi::Request
8
8
 
9
- &mdash; Documentation by YARD 0.9.28
9
+ &mdash; Documentation by YARD 0.9.37
10
10
 
11
11
  </title>
12
12
 
@@ -91,7 +91,7 @@
91
91
  <h2>Overview</h2><div class="docstring">
92
92
  <div class="discussion">
93
93
 
94
- <p>The Request module contains methods for making HTTP requests to the World Time API.</p>
94
+ <p>A module for making HTTP requests to the World Time API.</p>
95
95
 
96
96
 
97
97
  </div>
@@ -119,6 +119,14 @@
119
119
  </div>
120
120
  <div class="tags">
121
121
 
122
+ <div class="examples">
123
+ <h4 class="tag_title">Examples:</h4>
124
+
125
+
126
+ <pre class="example code"><code><span class='const'><span class='object_link'><a href="../WorldTimeApi.html" title="WorldTimeApi (module)">WorldTimeApi</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="" title="WorldTimeApi::Request (module)">Request</a></span></span><span class='op'>::</span><span class='const'>Call</span><span class='period'>.</span><span class='id identifier rubyid_call'>call</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>/timezone/Europe/London</span><span class='tstring_end'>&#39;</span></span><span class='rparen'>)</span></code></pre>
127
+
128
+ </div>
129
+
122
130
  <p class="tag_title">Returns:</p>
123
131
  <ul class="return">
124
132
 
@@ -140,7 +148,7 @@
140
148
 
141
149
  </div>
142
150
  </dt>
143
- <dd><pre class="code"><span class='tlambda'>-&gt;</span><span class='lparen'>(</span><span class='id identifier rubyid_url'>url</span><span class='rparen'>)</span> <span class='tlambeg'>{</span>
151
+ <dd><pre class="code"><span class='id identifier rubyid_lambda'>lambda</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_url'>url</span><span class='op'>|</span>
144
152
  <span class='kw'>begin</span>
145
153
  <span class='id identifier rubyid_response'>response</span> <span class='op'>=</span> <span class='id identifier rubyid_get'>get</span><span class='lparen'>(</span><span class='id identifier rubyid_url'>url</span><span class='rparen'>)</span>
146
154
 
@@ -167,9 +175,9 @@
167
175
  </div>
168
176
 
169
177
  <div id="footer">
170
- Generated on Thu Feb 23 15:07:23 2023 by
178
+ Generated on Thu Nov 20 18:24:43 2025 by
171
179
  <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
172
- 0.9.28 (ruby-3.2.0).
180
+ 0.9.37 (ruby-3.2.2).
173
181
  </div>
174
182
 
175
183
  </div>
@@ -6,7 +6,7 @@
6
6
  <title>
7
7
  Module: WorldTimeApi
8
8
 
9
- &mdash; Documentation by YARD 0.9.28
9
+ &mdash; Documentation by YARD 0.9.37
10
10
 
11
11
  </title>
12
12
 
@@ -88,7 +88,7 @@
88
88
  <h2>Overview</h2><div class="docstring">
89
89
  <div class="discussion">
90
90
 
91
- <p>The WorldTimeApi module contains methods for making requests to the World Time API.</p>
91
+ <p>A Ruby wrapper for the World Time API.</p>
92
92
 
93
93
 
94
94
  </div>
@@ -126,19 +126,27 @@
126
126
  </div>
127
127
  <div class="tags">
128
128
 
129
+ <div class="examples">
130
+ <h4 class="tag_title">Examples:</h4>
131
+
132
+
133
+ <pre class="example code"><code><span class='const'><span class='object_link'><a href="" title="WorldTimeApi (module)">WorldTimeApi</a></span></span><span class='op'>::</span><span class='const'>Timezones</span><span class='period'>.</span><span class='id identifier rubyid_call'>call</span></code></pre>
134
+
135
+ </div>
136
+
129
137
  <p class="tag_title">Returns:</p>
130
138
  <ul class="return">
131
139
 
132
140
  <li>
133
141
 
134
142
 
135
- <span class='type'>(<tt><span class='object_link'><a href="#Response-constant" title="WorldTimeApi::Response (constant)">WorldTimeApi::Response</a></span></tt>)</span>
143
+ <span class='type'>(<tt>Hash</tt>)</span>
136
144
 
137
145
 
138
146
 
139
147
  &mdash;
140
148
  <div class='inline'>
141
- <p>The API response.</p>
149
+ <p>A hash representing the response body, or an error hash if there was a problem with the request.</p>
142
150
  </div>
143
151
 
144
152
  </li>
@@ -160,19 +168,27 @@
160
168
  </div>
161
169
  <div class="tags">
162
170
 
171
+ <div class="examples">
172
+ <h4 class="tag_title">Examples:</h4>
173
+
174
+
175
+ <pre class="example code"><code><span class='const'><span class='object_link'><a href="" title="WorldTimeApi (module)">WorldTimeApi</a></span></span><span class='op'>::</span><span class='const'>Time</span><span class='period'>.</span><span class='id identifier rubyid_call'>call</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>Europe/London</span><span class='tstring_end'>&#39;</span></span><span class='rparen'>)</span></code></pre>
176
+
177
+ </div>
178
+
163
179
  <p class="tag_title">Returns:</p>
164
180
  <ul class="return">
165
181
 
166
182
  <li>
167
183
 
168
184
 
169
- <span class='type'>(<tt><span class='object_link'><a href="#Response-constant" title="WorldTimeApi::Response (constant)">WorldTimeApi::Response</a></span></tt>)</span>
185
+ <span class='type'>(<tt>Hash</tt>)</span>
170
186
 
171
187
 
172
188
 
173
189
  &mdash;
174
190
  <div class='inline'>
175
- <p>The API response.</p>
191
+ <p>A hash representing the response body, or an error hash if there was a problem with the request.</p>
176
192
  </div>
177
193
 
178
194
  </li>
@@ -181,7 +197,7 @@
181
197
 
182
198
  </div>
183
199
  </dt>
184
- <dd><pre class="code"><span class='tlambda'>-&gt;</span> <span class='lparen'>(</span><span class='id identifier rubyid_timezone'>timezone</span><span class='rparen'>)</span> <span class='tlambeg'>{</span> <span class='const'><span class='object_link'><a href="WorldTimeApi/Request.html" title="WorldTimeApi::Request (module)">Request</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="WorldTimeApi/Request.html#Call-constant" title="WorldTimeApi::Request::Call (constant)">Call</a></span></span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>/timezone/</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_timezone'>timezone</span><span class='embexpr_end'>}</span><span class='tstring_end'>&quot;</span></span><span class='rbracket'>]</span> <span class='rbrace'>}</span></pre></dd>
200
+ <dd><pre class="code"><span class='tlambda'>-&gt;</span><span class='lparen'>(</span><span class='id identifier rubyid_timezone'>timezone</span><span class='rparen'>)</span> <span class='tlambeg'>{</span> <span class='const'><span class='object_link'><a href="WorldTimeApi/Request.html" title="WorldTimeApi::Request (module)">Request</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="WorldTimeApi/Request.html#Call-constant" title="WorldTimeApi::Request::Call (constant)">Call</a></span></span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>/timezone/</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_timezone'>timezone</span><span class='embexpr_end'>}</span><span class='tstring_end'>&quot;</span></span><span class='rbracket'>]</span> <span class='rbrace'>}</span></pre></dd>
185
201
 
186
202
  <dt id="ClientIp-constant" class="">ClientIp =
187
203
  <div class="docstring">
@@ -194,19 +210,27 @@
194
210
  </div>
195
211
  <div class="tags">
196
212
 
213
+ <div class="examples">
214
+ <h4 class="tag_title">Examples:</h4>
215
+
216
+
217
+ <pre class="example code"><code><span class='const'><span class='object_link'><a href="" title="WorldTimeApi (module)">WorldTimeApi</a></span></span><span class='op'>::</span><span class='const'>ClientIp</span><span class='period'>.</span><span class='id identifier rubyid_call'>call</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>127.0.0.1</span><span class='tstring_end'>&#39;</span></span><span class='rparen'>)</span></code></pre>
218
+
219
+ </div>
220
+
197
221
  <p class="tag_title">Returns:</p>
198
222
  <ul class="return">
199
223
 
200
224
  <li>
201
225
 
202
226
 
203
- <span class='type'>(<tt><span class='object_link'><a href="#Response-constant" title="WorldTimeApi::Response (constant)">WorldTimeApi::Response</a></span></tt>)</span>
227
+ <span class='type'>(<tt>Hash</tt>)</span>
204
228
 
205
229
 
206
230
 
207
231
  &mdash;
208
232
  <div class='inline'>
209
- <p>The API response.</p>
233
+ <p>A hash representing the response body, or an error hash if there was a problem with the request.</p>
210
234
  </div>
211
235
 
212
236
  </li>
@@ -215,7 +239,7 @@
215
239
 
216
240
  </div>
217
241
  </dt>
218
- <dd><pre class="code"><span class='tlambda'>-&gt;</span> <span class='lparen'>(</span><span class='id identifier rubyid_ip'>ip</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='rparen'>)</span> <span class='tlambeg'>{</span> <span class='const'><span class='object_link'><a href="WorldTimeApi/Request.html" title="WorldTimeApi::Request (module)">Request</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="WorldTimeApi/Request.html#Call-constant" title="WorldTimeApi::Request::Call (constant)">Call</a></span></span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>/ip</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_ip'>ip</span> <span class='op'>?</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>/</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_ip'>ip</span><span class='embexpr_end'>}</span><span class='tstring_end'>&quot;</span></span> <span class='op'>:</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_end'>&#39;</span></span><span class='embexpr_end'>}</span><span class='tstring_end'>&quot;</span></span><span class='rbracket'>]</span> <span class='rbrace'>}</span></pre></dd>
242
+ <dd><pre class="code"><span class='tlambda'>-&gt;</span><span class='lparen'>(</span><span class='id identifier rubyid_ip'>ip</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='rparen'>)</span> <span class='tlambeg'>{</span> <span class='const'><span class='object_link'><a href="WorldTimeApi/Request.html" title="WorldTimeApi::Request (module)">Request</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="WorldTimeApi/Request.html#Call-constant" title="WorldTimeApi::Request::Call (constant)">Call</a></span></span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>/ip</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_ip'>ip</span> <span class='op'>?</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>/</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_ip'>ip</span><span class='embexpr_end'>}</span><span class='tstring_end'>&quot;</span></span> <span class='op'>:</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_end'>&quot;</span></span><span class='embexpr_end'>}</span><span class='tstring_end'>&quot;</span></span><span class='rbracket'>]</span> <span class='rbrace'>}</span></pre></dd>
219
243
 
220
244
  <dt id="Error-constant" class="">Error =
221
245
  <div class="docstring">
@@ -228,6 +252,14 @@
228
252
  </div>
229
253
  <div class="tags">
230
254
 
255
+ <div class="examples">
256
+ <h4 class="tag_title">Examples:</h4>
257
+
258
+
259
+ <pre class="example code"><code><span class='const'><span class='object_link'><a href="" title="WorldTimeApi (module)">WorldTimeApi</a></span></span><span class='op'>::</span><span class='const'>Error</span><span class='period'>.</span><span class='id identifier rubyid_call'>call</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>Invalid timezone</span><span class='tstring_end'>&#39;</span></span><span class='rparen'>)</span></code></pre>
260
+
261
+ </div>
262
+
231
263
  <p class="tag_title">Returns:</p>
232
264
  <ul class="return">
233
265
 
@@ -249,12 +281,23 @@
249
281
 
250
282
  </div>
251
283
  </dt>
252
- <dd><pre class="code"><span class='tlambda'>-&gt;</span> <span class='lparen'>(</span><span class='id identifier rubyid_message'>message</span><span class='rparen'>)</span> <span class='tlambeg'>{</span> <span class='lbrace'>{</span> <span class='label'>error:</span> <span class='id identifier rubyid_message'>message</span> <span class='rbrace'>}</span> <span class='rbrace'>}</span></pre></dd>
284
+ <dd><pre class="code"><span class='tlambda'>-&gt;</span><span class='lparen'>(</span><span class='id identifier rubyid_message'>message</span><span class='rparen'>)</span> <span class='tlambeg'>{</span> <span class='lbrace'>{</span> <span class='label'>error:</span> <span class='id identifier rubyid_message'>message</span> <span class='rbrace'>}</span> <span class='rbrace'>}</span></pre></dd>
253
285
 
254
286
  <dt id="VERSION-constant" class="">VERSION =
255
-
287
+ <div class="docstring">
288
+ <div class="discussion">
289
+
290
+ <p>The current version number of the WorldTimeApi gem.</p>
291
+
292
+
293
+ </div>
294
+ </div>
295
+ <div class="tags">
296
+
297
+
298
+ </div>
256
299
  </dt>
257
- <dd><pre class="code"><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>0.1.4</span><span class='tstring_end'>&quot;</span></span></pre></dd>
300
+ <dd><pre class="code"><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>0.1.5</span><span class='tstring_end'>&quot;</span></span></pre></dd>
258
301
 
259
302
  <dt id="Response-constant" class="">Response =
260
303
  <div class="docstring">
@@ -267,6 +310,14 @@
267
310
  </div>
268
311
  <div class="tags">
269
312
 
313
+ <div class="examples">
314
+ <h4 class="tag_title">Examples:</h4>
315
+
316
+
317
+ <pre class="example code"><code><span class='const'><span class='object_link'><a href="" title="WorldTimeApi (module)">WorldTimeApi</a></span></span><span class='op'>::</span><span class='const'>Response</span><span class='period'>.</span><span class='id identifier rubyid_call'>call</span><span class='lparen'>(</span><span class='const'>HTTParty</span><span class='period'>.</span><span class='id identifier rubyid_get'>get</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>http://worldtimeapi.org/api/timezone/Europe/London</span><span class='tstring_end'>&#39;</span></span><span class='rparen'>)</span><span class='rparen'>)</span></code></pre>
318
+
319
+ </div>
320
+
270
321
  <p class="tag_title">Returns:</p>
271
322
  <ul class="return">
272
323
 
@@ -288,7 +339,7 @@
288
339
 
289
340
  </div>
290
341
  </dt>
291
- <dd><pre class="code"><span class='tlambda'>-&gt;</span> <span class='lparen'>(</span><span class='id identifier rubyid_response'>response</span><span class='rparen'>)</span> <span class='tlambeg'>{</span> <span class='const'>JSON</span><span class='period'>.</span><span class='id identifier rubyid_parse'>parse</span><span class='lparen'>(</span><span class='id identifier rubyid_response'>response</span><span class='period'>.</span><span class='id identifier rubyid_body'>body</span><span class='rparen'>)</span> <span class='rbrace'>}</span></pre></dd>
342
+ <dd><pre class="code"><span class='tlambda'>-&gt;</span><span class='lparen'>(</span><span class='id identifier rubyid_response'>response</span><span class='rparen'>)</span> <span class='tlambeg'>{</span> <span class='const'>JSON</span><span class='period'>.</span><span class='id identifier rubyid_parse'>parse</span><span class='lparen'>(</span><span class='id identifier rubyid_response'>response</span><span class='period'>.</span><span class='id identifier rubyid_body'>body</span><span class='rparen'>)</span> <span class='rbrace'>}</span></pre></dd>
292
343
 
293
344
  </dl>
294
345
 
@@ -304,9 +355,9 @@
304
355
  </div>
305
356
 
306
357
  <div id="footer">
307
- Generated on Thu Feb 23 15:07:23 2023 by
358
+ Generated on Thu Nov 20 18:24:43 2025 by
308
359
  <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
309
- 0.9.28 (ruby-3.2.0).
360
+ 0.9.37 (ruby-3.2.2).
310
361
  </div>
311
362
 
312
363
  </div>
data/doc/_index.html CHANGED
@@ -4,7 +4,7 @@
4
4
  <meta charset="utf-8">
5
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
6
  <title>
7
- Documentation by YARD 0.9.28
7
+ Documentation by YARD 0.9.37
8
8
 
9
9
  </title>
10
10
 
@@ -52,7 +52,7 @@
52
52
  <div class="clear"></div>
53
53
  </div>
54
54
 
55
- <div id="content"><h1 class="noborder title">Documentation by YARD 0.9.28</h1>
55
+ <div id="content"><h1 class="noborder title">Documentation by YARD 0.9.37</h1>
56
56
  <div id="listing">
57
57
  <h1 class="alphaindex">Alphabetic Index</h1>
58
58
 
@@ -112,9 +112,9 @@
112
112
  </div>
113
113
 
114
114
  <div id="footer">
115
- Generated on Thu Feb 23 15:07:22 2023 by
115
+ Generated on Thu Nov 20 18:24:43 2025 by
116
116
  <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
117
- 0.9.28 (ruby-3.2.0).
117
+ 0.9.37 (ruby-3.2.2).
118
118
  </div>
119
119
 
120
120
  </div>
data/doc/class_list.html CHANGED
@@ -1,5 +1,5 @@
1
1
  <!DOCTYPE html>
2
- <html>
2
+ <html >
3
3
  <head>
4
4
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
5
5
  <meta charset="utf-8" />
@@ -38,12 +38,15 @@
38
38
 
39
39
  </div>
40
40
 
41
- <div id="search">Search: <input type="text" /></div>
41
+ <div id="search">
42
+ <label for="search-class">Search:</label>
43
+ <input id="search-class" type="text" />
44
+ </div>
42
45
  </div>
43
46
 
44
47
  <ul id="full_list" class="class">
45
48
  <li id="object_" class="odd"><div class="item" style="padding-left:30px"><span class='object_link'><a href="top-level-namespace.html" title="Top Level Namespace (root)">Top Level Namespace</a></span></div></li>
46
- <li id='object_WorldTimeApi' class='even'><div class='item' style='padding-left:30px'><a class='toggle'></a> <span class='object_link'><a href="WorldTimeApi.html" title="WorldTimeApi (module)">WorldTimeApi</a></span><small class='search_info'>Top Level Namespace</small></div><ul><li id='object_WorldTimeApi::Request' class='collapsed odd'><div class='item' style='padding-left:45px'><span class='object_link'><a href="WorldTimeApi/Request.html" title="WorldTimeApi::Request (module)">Request</a></span><small class='search_info'>WorldTimeApi</small></div></li></ul></li>
49
+ <li id='object_WorldTimeApi' class='even'><div class='item' style='padding-left:30px'><a tabindex='0' class='toggle' role='button' aria-label='WorldTimeApi child nodes' aria-expanded='false' aria-controls='object_WorldTimeApi'></a> <span class='object_link'><a href="WorldTimeApi.html" title="WorldTimeApi (module)">WorldTimeApi</a></span><small class='search_info'>Top Level Namespace</small></div><div aria-labelledby='object_WorldTimeApi'><ul><li id='object_WorldTimeApi::Request' class='collapsed odd'><div class='item' style='padding-left:45px'><span class='object_link'><a href="WorldTimeApi/Request.html" title="WorldTimeApi::Request (module)">Request</a></span><small class='search_info'>WorldTimeApi</small></div></li></ul></div></li>
47
50
 
48
51
  </ul>
49
52
  </div>
@@ -20,8 +20,8 @@ h1 { padding: 12px 10px; padding-bottom: 0; margin: 0; font-size: 1.4em; }
20
20
  #content.insearch #noresults { margin-left: 7px; }
21
21
  li.collapsed ul { display: none; }
22
22
  li a.toggle { cursor: default; position: relative; left: -5px; top: 4px; text-indent: -999px; width: 10px; height: 9px; margin-left: -10px; display: block; float: left; background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAASCAYAAABb0P4QAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAK8AAACvABQqw0mAAAABx0RVh0U29mdHdhcmUAQWRvYmUgRmlyZXdvcmtzIENTM5jWRgMAAAAVdEVYdENyZWF0aW9uIFRpbWUAMy8xNC8wOeNZPpQAAAE2SURBVDiNrZTBccIwEEXfelIAHUA6CZ24BGaWO+FuzZAK4k6gg5QAdGAq+Bxs2Yqx7BzyL7Llp/VfzZeQhCTc/ezuGzKKnKSzpCxXJM8fwNXda3df5RZETlIt6YUzSQDs93sl8w3wBZxCCE10GM1OcWbWjB2mWgEH4Mfdyxm3PSepBHibgQE2wLe7r4HjEidpnXMYdQPKEMJcsZ4zs2POYQOcaPfwMVOo58zsAdMt18BuoVDPxUJRacELbXv3hUIX2vYmOUvi8C8ydz/ThjXrqKqqLbDIAdsCKBd+Wo7GWa7o9qzOQHVVVXeAbs+yHHCH4aTsaCOQqunmUy1yBUAXkdMIfMlgF5EXLo2OpV/c/Up7jG4hhHcYLgWzAZXUc2b2ixsfvc/RmNNfOXD3Q/oeL9axJE1yT9IOoUu6MGUkAAAAAElFTkSuQmCC) no-repeat bottom left; }
23
- li.collapsed a.toggle { opacity: 0.5; cursor: default; background-position: top left; }
24
- li { color: #888; cursor: pointer; }
23
+ li.collapsed a.toggle { cursor: default; background-position: top left; }
24
+ li { color: #666; cursor: pointer; }
25
25
  li.deprecated { text-decoration: line-through; font-style: italic; }
26
26
  li.odd { background: #f0f0f0; }
27
27
  li.even { background: #fafafa; }
@@ -47,7 +47,7 @@ li small { display: block; font-size: 0.8em; }
47
47
  li small:before { content: ""; }
48
48
  li small:after { content: ""; }
49
49
  li small.search_info { display: none; }
50
- #search { width: 170px; position: static; margin: 3px; margin-left: 10px; font-size: 0.9em; color: #888; padding-left: 0; padding-right: 24px; }
50
+ #search { width: 170px; position: static; margin: 3px; margin-left: 10px; font-size: 0.9em; color: #666; padding-left: 0; padding-right: 24px; }
51
51
  #content.insearch #search { background-position: center right; }
52
52
  #search input { width: 110px; }
53
53
 
data/doc/css/style.css CHANGED
@@ -82,6 +82,11 @@ body {
82
82
  #search { display: none; }
83
83
  }
84
84
 
85
+ @media (max-width: 320px) {
86
+ body { height: 100%; overflow: hidden; overflow-wrap: break-word; }
87
+ #main { height: 100%; overflow: auto; }
88
+ }
89
+
85
90
  #main img { max-width: 100%; }
86
91
  h1 { font-size: 25px; margin: 1em 0 0.5em; padding-top: 4px; border-top: 1px dotted #d5d5d5; }
87
92
  h1.noborder { border-top: 0px; margin-top: 0; padding-top: 4px; }
@@ -106,6 +111,7 @@ h2 small a {
106
111
  position: relative;
107
112
  padding: 2px 7px;
108
113
  }
114
+ a { font-weight: 550; }
109
115
  .clear { clear: both; }
110
116
  .inline { display: inline; }
111
117
  .inline p:first-child { display: inline; }
data/doc/file.README.html CHANGED
@@ -6,7 +6,7 @@
6
6
  <title>
7
7
  File: README
8
8
 
9
- &mdash; Documentation by YARD 0.9.28
9
+ &mdash; Documentation by YARD 0.9.37
10
10
 
11
11
  </title>
12
12
 
@@ -57,67 +57,70 @@
57
57
  <div class="clear"></div>
58
58
  </div>
59
59
 
60
- <div id="content"><div id='filecontents'><h1 id="worldtimeapi">WorldTimeApi</h1>
60
+ <div id="content"><div id='filecontents'>
61
+ <h1 id="label-WorldTimeApi">WorldTimeApi</h1>
61
62
 
62
- <p><a href="https://badge.fury.io/rb/world_time_api"><img src="https://badge.fury.io/rb/world_time_api.svg" alt="Gem Version" /></a></p>
63
+ <p><a href="https://badge.fury.io/rb/world_time_api"><img src="https://badge.fury.io/rb/world_time_api.svg"></a></p>
63
64
 
64
- <p>Welcome to your new gem! In this directory, you’ll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file <code>lib/world_time_api</code>. To experiment with that code, run <code>bin/console</code> for an interactive prompt.</p>
65
+ <p>A Ruby wrapper for the World Time API.</p>
65
66
 
66
- <h2 id="installation">Installation</h2>
67
+ <h2 id="label-Installation">Installation</h2>
67
68
 
68
69
  <p>Add this line to your application’s Gemfile:</p>
69
70
 
70
- <p><code>ruby
71
- gem 'world_time_api'
72
- </code></p>
71
+ <pre class="code ruby"><code class="ruby"><span class='id identifier rubyid_gem'>gem</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>world_time_api</span><span class='tstring_end'>&#39;</span></span>
72
+ </code></pre>
73
73
 
74
74
  <p>And then execute:</p>
75
75
 
76
- <p><code>bash
77
- bundle install
78
- </code></p>
76
+ <pre class="code ruby"><code class="ruby"><span class='id identifier rubyid_bundle'>bundle</span> <span class='id identifier rubyid_install'>install</span>
77
+ </code></pre>
79
78
 
80
79
  <p>Or install it yourself as:</p>
81
80
 
82
- <p><code>bash
83
- gem install world_time_api
84
- </code></p>
81
+ <pre class="code ruby"><code class="ruby"><span class='id identifier rubyid_gem'>gem</span> <span class='id identifier rubyid_install'>install</span> <span class='id identifier rubyid_world_time_api'>world_time_api</span>
82
+ </code></pre>
85
83
 
86
- <h2 id="usage">Usage</h2>
84
+ <h2 id="label-Usage">Usage</h2>
87
85
 
88
- <p>```ruby
89
- WorldTimeApi::Timezones.call # list timezones</p>
86
+ <h3 id="label-List+timezones">List timezones</h3>
90
87
 
91
- <p>WorldTimeApi::Time.call(time_zone) # get datetime of the timezone</p>
88
+ <pre class="code ruby"><code class="ruby"><span class='const'><span class='object_link'><a href="WorldTimeApi.html" title="WorldTimeApi (module)">WorldTimeApi</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="WorldTimeApi.html#Timezones-constant" title="WorldTimeApi::Timezones (constant)">Timezones</a></span></span><span class='period'>.</span><span class='id identifier rubyid_call'>call</span>
89
+ </code></pre>
92
90
 
93
- <p>WorldTimeApi::ClientIp.call # get datetime by your client ip</p>
91
+ <h3 id="label-Get+time+by+timezone">Get time by timezone</h3>
94
92
 
95
- <p>WorldTimeApi::ClientIp.call(ip_address) # get datatime by ip address
96
- ```</p>
93
+ <pre class="code ruby"><code class="ruby"><span class='const'><span class='object_link'><a href="WorldTimeApi.html" title="WorldTimeApi (module)">WorldTimeApi</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="WorldTimeApi.html#Time-constant" title="WorldTimeApi::Time (constant)">Time</a></span></span><span class='period'>.</span><span class='id identifier rubyid_call'>call</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>Europe/London</span><span class='tstring_end'>&#39;</span></span><span class='rparen'>)</span>
94
+ </code></pre>
97
95
 
98
- <h2 id="development">Development</h2>
96
+ <h3 id="label-Get+time+by+IP+address">Get time by IP address</h3>
97
+
98
+ <pre class="code ruby"><code class="ruby"><span class='const'><span class='object_link'><a href="WorldTimeApi.html" title="WorldTimeApi (module)">WorldTimeApi</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="WorldTimeApi.html#ClientIp-constant" title="WorldTimeApi::ClientIp (constant)">ClientIp</a></span></span><span class='period'>.</span><span class='id identifier rubyid_call'>call</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>12.215.42.19</span><span class='tstring_end'>&#39;</span></span><span class='rparen'>)</span>
99
+ </code></pre>
100
+
101
+ <h2 id="label-Development">Development</h2>
99
102
 
100
103
  <p>After checking out the repo, run <code>bin/setup</code> to install dependencies. You can also run <code>bin/console</code> for an interactive prompt that will allow you to experiment.</p>
101
104
 
102
105
  <p>To install this gem onto your local machine, run <code>bundle exec rake install</code>. To release a new version, update the version number in <code>version.rb</code>, and then run <code>bundle exec rake release</code>, which will create a git tag for the version, push git commits and the created tag, and push the <code>.gem</code> file to <a href="https://rubygems.org">rubygems.org</a>.</p>
103
106
 
104
- <h2 id="contributing">Contributing</h2>
107
+ <h2 id="label-Contributing">Contributing</h2>
105
108
 
106
- <p>Bug reports and pull requests are welcome on GitHub at https://github.com/nemuba/world_time_api. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the <a href="https://github.com/[USERNAME]/world_time_api/blob/master/CODE_OF_CONDUCT.md">code of conduct</a>.</p>
109
+ <p>Bug reports and pull requests are welcome on GitHub at <a href="https://github.com/nemuba/world_time_api">github.com/nemuba/world_time_api</a>. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the of conduct[https://github.com/[USERNAME]/world_time_api/blob/master/CODE_OF_CONDUCT.md].</p>
107
110
 
108
- <h2 id="license">License</h2>
111
+ <h2 id="label-License">License</h2>
109
112
 
110
113
  <p>The gem is available as open source under the terms of the <a href="https://opensource.org/licenses/MIT">MIT License</a>.</p>
111
114
 
112
- <h2 id="code-of-conduct">Code of Conduct</h2>
115
+ <h2 id="label-Code+of+Conduct">Code of Conduct</h2>
113
116
 
114
- <p>Everyone interacting in the WorldTimeApi project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the <a href="https://github.com/[USERNAME]/world_time_api/blob/master/CODE_OF_CONDUCT.md">code of conduct</a>.</p>
117
+ <p>Everyone interacting in the WorldTimeApi project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the of conduct[https://github.com/[USERNAME]/world_time_api/blob/master/CODE_OF_CONDUCT.md].</p>
115
118
  </div></div>
116
119
 
117
120
  <div id="footer">
118
- Generated on Thu Feb 23 15:07:22 2023 by
121
+ Generated on Thu Nov 20 18:24:43 2025 by
119
122
  <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
120
- 0.9.28 (ruby-3.2.0).
123
+ 0.9.37 (ruby-3.2.2).
121
124
  </div>
122
125
 
123
126
  </div>
data/doc/file_list.html CHANGED
@@ -1,5 +1,5 @@
1
1
  <!DOCTYPE html>
2
- <html>
2
+ <html >
3
3
  <head>
4
4
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
5
5
  <meta charset="utf-8" />
@@ -38,7 +38,10 @@
38
38
 
39
39
  </div>
40
40
 
41
- <div id="search">Search: <input type="text" /></div>
41
+ <div id="search">
42
+ <label for="search-class">Search:</label>
43
+ <input id="search-class" type="text" />
44
+ </div>
42
45
  </div>
43
46
 
44
47
  <ul id="full_list" class="file">
data/doc/frames.html CHANGED
@@ -2,13 +2,18 @@
2
2
  <html>
3
3
  <head>
4
4
  <meta charset="utf-8">
5
- <title>Documentation by YARD 0.9.28</title>
5
+ <title>Documentation by YARD 0.9.37</title>
6
6
  </head>
7
7
  <script type="text/javascript">
8
- var match = unescape(window.location.hash).match(/^#!(.+)/);
9
- var name = match ? match[1] : 'index.html';
10
- name = name.replace(/^(\w+):\/\//, '').replace(/^\/\//, '');
11
- window.top.location = name;
8
+ var mainUrl = 'index.html';
9
+ try {
10
+ var match = decodeURIComponent(window.location.hash).match(/^#!(.+)/);
11
+ var name = match ? match[1] : mainUrl;
12
+ var url = new URL(name, location.href);
13
+ window.top.location.replace(url.origin === location.origin ? name : mainUrl);
14
+ } catch (e) {
15
+ window.top.location.replace(mainUrl);
16
+ }
12
17
  </script>
13
18
  <noscript>
14
19
  <h1>Oops!</h1>