jylis-rb 0.1.0 → 0.2.0

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: 41185cdd95d1e64b87795154c5faf305e3cb779a40ac700c7dfd2cbf72ee612a
4
- data.tar.gz: 3bac8f3e7f9e452b728125692b8f6e774e9a3385fc37a22fc903e24b444ee7cc
3
+ metadata.gz: ec6270d7fcf8eb0bb81077fdf5d3c42dd433e5c09897d6a523edd01ee8840d25
4
+ data.tar.gz: fc51bd25117f4ee9e317cd6feffec17c620da71fdaa3e19bd31d4ca75fefc975
5
5
  SHA512:
6
- metadata.gz: 7c4f4eea104188d50d6c87357aadcdd6892191315792a244d408a91124017959d322f95623c4be4c66eb46430d8949ae45c574594e723bcb48d8fe950ccb0a5b
7
- data.tar.gz: 895123f2fbdfbc566b32874fc4a0741a78166128401918224090379aa15ee00435acf41d2913f269e06cd7eda91abe3b825b6e81b7ab62ccd53635fc55d02f96
6
+ metadata.gz: 85e5fdaaefd752f4ed1171f48bf2cb5a449c97bca1e2191d299b2fa5206251089e571a6f5c27298fbcca05ec41f8f709cce89da85d7d4f829cba935c8506903a
7
+ data.tar.gz: c541eb182f7b47f60b8e6e59debe52735d58517269543d7ccf2697bcf97c94ca7065163130296af1db120e3f1d70f6468cc41199720e80f25eea29c66c7c45b9
data/README.md CHANGED
@@ -56,7 +56,7 @@ $ bundle install
56
56
  Ensure the tests pass:
57
57
 
58
58
  ```text
59
- $ rake
59
+ $ bundle exec rake
60
60
  ```
61
61
 
62
62
  Install the gem from the working source code:
@@ -197,9 +197,9 @@ Jylis.mvreg.get "thermostat"
197
197
  Unordered JSON <sup>[[link](https://jemc.github.io/jylis/docs/types/ujson/)]</sup>
198
198
 
199
199
  ```ruby
200
- Jylis.ujson.set "users", "alice", "admin", false
201
- Jylis.ujson.set "users", "brett", "admin", false
202
- Jylis.ujson.set "users", "carol", "admin", true
200
+ Jylis.ujson.set "users", "alice", {"admin": false}
201
+ Jylis.ujson.set "users", "brett", {"admin": false}
202
+ Jylis.ujson.set "users", "carol", {"admin": true}
203
203
 
204
204
  Jylis.ujson.get "users"
205
205
  # => {"brett"=>{"admin"=>false}, "carol"=>{"admin"=>true}, "alice"=>{"admin"=>false}}
@@ -226,3 +226,24 @@ Jylis.query "TLOG", "INS", "temperature", 72.6, 5
226
226
  Jylis.query "TLOG", "GET", "temperature"
227
227
  # => [["72.6", 5]]
228
228
  ```
229
+
230
+ ### Timestamps
231
+
232
+ In addition to supporting integer timestamps as defined by the Jylis spec, this
233
+ library also has helpers to convert the Jylis `Timestamped` data types to/from
234
+ ISO 8601. Functions that have a `timestamp` parameter will automatically convert
235
+ an ISO 8601 string to a Unix timestamp.
236
+
237
+ ```ruby
238
+ Jylis.treg.set "volume", 64, "2018-06-06T01:42:57Z"
239
+
240
+ result = Jylis.treg.get "volume"
241
+ # => #<Jylis::DataType::TREG::Result:0x00005609aa767f00 @timestamp=1528249377, @value="64">
242
+
243
+ result.timestamp
244
+ # => 1528249377
245
+ result.time
246
+ # => 2018-06-05 18:42:57 -0700
247
+ result.timestamp_iso8601
248
+ # => "2018-06-06T01:42:57Z"
249
+ ```
data/doc/Jylis.html CHANGED
@@ -147,7 +147,7 @@
147
147
 
148
148
  </div>
149
149
  </dt>
150
- <dd><pre class="code"><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>0.1.0</span><span class='tstring_end'>&quot;</span></span><span class='period'>.</span><span class='id identifier rubyid_freeze'>freeze</span></pre></dd>
150
+ <dd><pre class="code"><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>0.2.0</span><span class='tstring_end'>&quot;</span></span><span class='period'>.</span><span class='id identifier rubyid_freeze'>freeze</span></pre></dd>
151
151
 
152
152
  </dl>
153
153
 
@@ -664,12 +664,16 @@
664
664
 
665
665
  25
666
666
  26
667
- 27</pre>
667
+ 27
668
+ 28
669
+ 29</pre>
668
670
  </td>
669
671
  <td>
670
672
  <pre class="code"><span class="info file"># File 'lib/jylis-rb/jylis.rb', line 25</span>
671
673
 
672
674
  <span class='kw'>def</span> <span class='id identifier rubyid_connected?'>connected?</span>
675
+ <span class='kw'>return</span> <span class='kw'>false</span> <span class='kw'>unless</span> <span class='id identifier rubyid_current'>current</span>
676
+
673
677
  <span class='id identifier rubyid_current'>current</span><span class='period'>.</span><span class='id identifier rubyid_connected?'>connected?</span>
674
678
  <span class='kw'>end</span></pre>
675
679
  </td>
@@ -710,12 +714,12 @@
710
714
  <pre class="lines">
711
715
 
712
716
 
713
- 37
714
- 38
715
- 39</pre>
717
+ 39
718
+ 40
719
+ 41</pre>
716
720
  </td>
717
721
  <td>
718
- <pre class="code"><span class="info file"># File 'lib/jylis-rb/jylis.rb', line 37</span>
722
+ <pre class="code"><span class="info file"># File 'lib/jylis-rb/jylis.rb', line 39</span>
719
723
 
720
724
  <span class='kw'>def</span> <span class='id identifier rubyid_disconnect'>disconnect</span>
721
725
  <span class='id identifier rubyid_current'>current</span><span class='period'>.</span><span class='id identifier rubyid_disconnect'>disconnect</span>
@@ -771,12 +775,12 @@
771
775
  <pre class="lines">
772
776
 
773
777
 
774
- 78
775
- 79
776
- 80</pre>
778
+ 80
779
+ 81
780
+ 82</pre>
777
781
  </td>
778
782
  <td>
779
- <pre class="code"><span class="info file"># File 'lib/jylis-rb/jylis.rb', line 78</span>
783
+ <pre class="code"><span class="info file"># File 'lib/jylis-rb/jylis.rb', line 80</span>
780
784
 
781
785
  <span class='kw'>def</span> <span class='id identifier rubyid_gcount'>gcount</span>
782
786
  <span class='id identifier rubyid_current'>current</span><span class='period'>.</span><span class='id identifier rubyid_gcount'>gcount</span>
@@ -832,12 +836,12 @@
832
836
  <pre class="lines">
833
837
 
834
838
 
835
- 96
836
- 97
837
- 98</pre>
839
+ 98
840
+ 99
841
+ 100</pre>
838
842
  </td>
839
843
  <td>
840
- <pre class="code"><span class="info file"># File 'lib/jylis-rb/jylis.rb', line 96</span>
844
+ <pre class="code"><span class="info file"># File 'lib/jylis-rb/jylis.rb', line 98</span>
841
845
 
842
846
  <span class='kw'>def</span> <span class='id identifier rubyid_mvreg'>mvreg</span>
843
847
  <span class='id identifier rubyid_current'>current</span><span class='period'>.</span><span class='id identifier rubyid_mvreg'>mvreg</span>
@@ -893,12 +897,12 @@
893
897
  <pre class="lines">
894
898
 
895
899
 
896
- 87
897
- 88
898
- 89</pre>
900
+ 89
901
+ 90
902
+ 91</pre>
899
903
  </td>
900
904
  <td>
901
- <pre class="code"><span class="info file"># File 'lib/jylis-rb/jylis.rb', line 87</span>
905
+ <pre class="code"><span class="info file"># File 'lib/jylis-rb/jylis.rb', line 89</span>
902
906
 
903
907
  <span class='kw'>def</span> <span class='id identifier rubyid_pncount'>pncount</span>
904
908
  <span class='id identifier rubyid_current'>current</span><span class='period'>.</span><span class='id identifier rubyid_pncount'>pncount</span>
@@ -981,12 +985,12 @@
981
985
  <pre class="lines">
982
986
 
983
987
 
984
- 49
985
- 50
986
- 51</pre>
988
+ 51
989
+ 52
990
+ 53</pre>
987
991
  </td>
988
992
  <td>
989
- <pre class="code"><span class="info file"># File 'lib/jylis-rb/jylis.rb', line 49</span>
993
+ <pre class="code"><span class="info file"># File 'lib/jylis-rb/jylis.rb', line 51</span>
990
994
 
991
995
  <span class='kw'>def</span> <span class='id identifier rubyid_query'>query</span><span class='lparen'>(</span><span class='op'>*</span><span class='id identifier rubyid_args'>args</span><span class='rparen'>)</span>
992
996
  <span class='id identifier rubyid_current'>current</span><span class='period'>.</span><span class='id identifier rubyid_query'>query</span><span class='lparen'>(</span><span class='op'>*</span><span class='id identifier rubyid_args'>args</span><span class='rparen'>)</span>
@@ -1029,12 +1033,12 @@
1029
1033
  <pre class="lines">
1030
1034
 
1031
1035
 
1032
- 31
1033
- 32
1034
- 33</pre>
1036
+ 33
1037
+ 34
1038
+ 35</pre>
1035
1039
  </td>
1036
1040
  <td>
1037
- <pre class="code"><span class="info file"># File 'lib/jylis-rb/jylis.rb', line 31</span>
1041
+ <pre class="code"><span class="info file"># File 'lib/jylis-rb/jylis.rb', line 33</span>
1038
1042
 
1039
1043
  <span class='kw'>def</span> <span class='id identifier rubyid_reconnect'>reconnect</span>
1040
1044
  <span class='id identifier rubyid_current'>current</span><span class='period'>.</span><span class='id identifier rubyid_reconnect'>reconnect</span>
@@ -1090,12 +1094,12 @@
1090
1094
  <pre class="lines">
1091
1095
 
1092
1096
 
1093
- 69
1094
- 70
1095
- 71</pre>
1097
+ 71
1098
+ 72
1099
+ 73</pre>
1096
1100
  </td>
1097
1101
  <td>
1098
- <pre class="code"><span class="info file"># File 'lib/jylis-rb/jylis.rb', line 69</span>
1102
+ <pre class="code"><span class="info file"># File 'lib/jylis-rb/jylis.rb', line 71</span>
1099
1103
 
1100
1104
  <span class='kw'>def</span> <span class='id identifier rubyid_tlog'>tlog</span>
1101
1105
  <span class='id identifier rubyid_current'>current</span><span class='period'>.</span><span class='id identifier rubyid_tlog'>tlog</span>
@@ -1151,12 +1155,12 @@
1151
1155
  <pre class="lines">
1152
1156
 
1153
1157
 
1154
- 60
1155
- 61
1156
- 62</pre>
1158
+ 62
1159
+ 63
1160
+ 64</pre>
1157
1161
  </td>
1158
1162
  <td>
1159
- <pre class="code"><span class="info file"># File 'lib/jylis-rb/jylis.rb', line 60</span>
1163
+ <pre class="code"><span class="info file"># File 'lib/jylis-rb/jylis.rb', line 62</span>
1160
1164
 
1161
1165
  <span class='kw'>def</span> <span class='id identifier rubyid_treg'>treg</span>
1162
1166
  <span class='id identifier rubyid_current'>current</span><span class='period'>.</span><span class='id identifier rubyid_treg'>treg</span>
@@ -1212,12 +1216,12 @@
1212
1216
  <pre class="lines">
1213
1217
 
1214
1218
 
1215
- 105
1216
- 106
1217
- 107</pre>
1219
+ 107
1220
+ 108
1221
+ 109</pre>
1218
1222
  </td>
1219
1223
  <td>
1220
- <pre class="code"><span class="info file"># File 'lib/jylis-rb/jylis.rb', line 105</span>
1224
+ <pre class="code"><span class="info file"># File 'lib/jylis-rb/jylis.rb', line 107</span>
1221
1225
 
1222
1226
  <span class='kw'>def</span> <span class='id identifier rubyid_ujson'>ujson</span>
1223
1227
  <span class='id identifier rubyid_current'>current</span><span class='period'>.</span><span class='id identifier rubyid_ujson'>ujson</span>
@@ -1232,7 +1236,7 @@
1232
1236
  </div>
1233
1237
 
1234
1238
  <div id="footer">
1235
- Generated on Sun Jun 3 21:46:59 2018 by
1239
+ Generated on Tue Jun 5 17:01:51 2018 by
1236
1240
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
1237
1241
  0.9.14 (ruby-2.5.1).
1238
1242
  </div>
@@ -1118,7 +1118,7 @@
1118
1118
  </div>
1119
1119
 
1120
1120
  <div id="footer">
1121
- Generated on Sun Jun 3 21:46:59 2018 by
1121
+ Generated on Tue Jun 5 17:01:51 2018 by
1122
1122
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
1123
1123
  0.9.14 (ruby-2.5.1).
1124
1124
  </div>
@@ -125,7 +125,7 @@
125
125
  </div>
126
126
 
127
127
  <div id="footer">
128
- Generated on Sun Jun 3 21:46:59 2018 by
128
+ Generated on Tue Jun 5 17:01:51 2018 by
129
129
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
130
130
  0.9.14 (ruby-2.5.1).
131
131
  </div>
@@ -125,7 +125,7 @@
125
125
  </div>
126
126
 
127
127
  <div id="footer">
128
- Generated on Sun Jun 3 21:46:59 2018 by
128
+ Generated on Tue Jun 5 17:01:51 2018 by
129
129
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
130
130
  0.9.14 (ruby-2.5.1).
131
131
  </div>
@@ -125,7 +125,7 @@
125
125
  </div>
126
126
 
127
127
  <div id="footer">
128
- Generated on Sun Jun 3 21:46:59 2018 by
128
+ Generated on Tue Jun 5 17:01:51 2018 by
129
129
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
130
130
  0.9.14 (ruby-2.5.1).
131
131
  </div>
@@ -336,7 +336,7 @@ can&#39;t be instantiated directly.</p>
336
336
  </div>
337
337
 
338
338
  <div id="footer">
339
- Generated on Sun Jun 3 21:47:00 2018 by
339
+ Generated on Tue Jun 5 17:01:51 2018 by
340
340
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
341
341
  0.9.14 (ruby-2.5.1).
342
342
  </div>
@@ -321,7 +321,7 @@
321
321
  </div>
322
322
 
323
323
  <div id="footer">
324
- Generated on Sun Jun 3 21:47:00 2018 by
324
+ Generated on Tue Jun 5 17:01:52 2018 by
325
325
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
326
326
  0.9.14 (ruby-2.5.1).
327
327
  </div>
@@ -308,7 +308,7 @@
308
308
  </div>
309
309
 
310
310
  <div id="footer">
311
- Generated on Sun Jun 3 21:47:00 2018 by
311
+ Generated on Tue Jun 5 17:01:51 2018 by
312
312
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
313
313
  0.9.14 (ruby-2.5.1).
314
314
  </div>
@@ -394,7 +394,7 @@
394
394
  </div>
395
395
 
396
396
  <div id="footer">
397
- Generated on Sun Jun 3 21:47:00 2018 by
397
+ Generated on Tue Jun 5 17:01:52 2018 by
398
398
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
399
399
  0.9.14 (ruby-2.5.1).
400
400
  </div>
@@ -376,16 +376,16 @@ timestamps earlier than the cutoff timestamp.</p>
376
376
  <pre class="lines">
377
377
 
378
378
 
379
- 148
380
- 149
381
- 150
382
- 151
383
- 152
384
- 153
385
- 154</pre>
379
+ 164
380
+ 165
381
+ 166
382
+ 167
383
+ 168
384
+ 169
385
+ 170</pre>
386
386
  </td>
387
387
  <td>
388
- <pre class="code"><span class="info file"># File 'lib/jylis-rb/data_types/tlog.rb', line 148</span>
388
+ <pre class="code"><span class="info file"># File 'lib/jylis-rb/data_types/tlog.rb', line 164</span>
389
389
 
390
390
  <span class='kw'>def</span> <span class='id identifier rubyid_clr'>clr</span><span class='lparen'>(</span><span class='id identifier rubyid_key'>key</span><span class='rparen'>)</span>
391
391
  <span class='id identifier rubyid_result'>result</span> <span class='op'>=</span> <span class='id identifier rubyid_connection'>connection</span><span class='period'>.</span><span class='id identifier rubyid_query'>query</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>TLOG</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>CLR</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='id identifier rubyid_key'>key</span><span class='rparen'>)</span>
@@ -443,12 +443,12 @@ timestamps earlier than the cutoff timestamp.</p>
443
443
  <pre class="lines">
444
444
 
445
445
 
446
- 118
447
- 119
448
- 120</pre>
446
+ 131
447
+ 132
448
+ 133</pre>
449
449
  </td>
450
450
  <td>
451
- <pre class="code"><span class="info file"># File 'lib/jylis-rb/data_types/tlog.rb', line 118</span>
451
+ <pre class="code"><span class="info file"># File 'lib/jylis-rb/data_types/tlog.rb', line 131</span>
452
452
 
453
453
  <span class='kw'>def</span> <span class='id identifier rubyid_cutoff'>cutoff</span><span class='lparen'>(</span><span class='id identifier rubyid_key'>key</span><span class='rparen'>)</span>
454
454
  <span class='id identifier rubyid_connection'>connection</span><span class='period'>.</span><span class='id identifier rubyid_query'>query</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>TLOG</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>CUTOFF</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='id identifier rubyid_key'>key</span><span class='rparen'>)</span>
@@ -497,18 +497,18 @@ timestamps earlier than the cutoff timestamp.</p>
497
497
  <pre class="lines">
498
498
 
499
499
 
500
- 84
501
- 85
502
- 86
503
- 87
504
- 88
505
- 89
506
- 90
507
- 91
508
- 92</pre>
500
+ 94
501
+ 95
502
+ 96
503
+ 97
504
+ 98
505
+ 99
506
+ 100
507
+ 101
508
+ 102</pre>
509
509
  </td>
510
510
  <td>
511
- <pre class="code"><span class="info file"># File 'lib/jylis-rb/data_types/tlog.rb', line 84</span>
511
+ <pre class="code"><span class="info file"># File 'lib/jylis-rb/data_types/tlog.rb', line 94</span>
512
512
 
513
513
  <span class='kw'>def</span> <span class='id identifier rubyid_get'>get</span><span class='lparen'>(</span><span class='id identifier rubyid_key'>key</span><span class='comma'>,</span> <span class='id identifier rubyid_count'>count</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='rparen'>)</span>
514
514
  <span class='id identifier rubyid_params'>params</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>TLOG</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>GET</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='id identifier rubyid_key'>key</span><span class='rbracket'>]</span>
@@ -542,7 +542,27 @@ timestamps earlier than the cutoff timestamp.</p>
542
542
  </div>
543
543
  </div>
544
544
  <div class="tags">
545
+ <p class="tag_title">Parameters:</p>
546
+ <ul class="param">
547
+
548
+ <li>
549
+
550
+ <span class='name'>timestamp</span>
551
+
552
+
553
+ <span class='type'>(<tt>Integer</tt>, <tt>String</tt>)</span>
554
+
555
+
556
+
557
+ &mdash;
558
+ <div class='inline'>
559
+ <p>a unix or iso8601 formatted timestamp</p>
560
+ </div>
561
+
562
+ </li>
545
563
 
564
+ </ul>
565
+
546
566
 
547
567
  </div><table class="source_code">
548
568
  <tr>
@@ -550,19 +570,21 @@ timestamps earlier than the cutoff timestamp.</p>
550
570
  <pre class="lines">
551
571
 
552
572
 
553
- 104
554
- 105
555
- 106
556
- 107
557
- 108
558
- 109
559
- 110</pre>
573
+ 116
574
+ 117
575
+ 118
576
+ 119
577
+ 120
578
+ 121
579
+ 122
580
+ 123</pre>
560
581
  </td>
561
582
  <td>
562
- <pre class="code"><span class="info file"># File 'lib/jylis-rb/data_types/tlog.rb', line 104</span>
583
+ <pre class="code"><span class="info file"># File 'lib/jylis-rb/data_types/tlog.rb', line 116</span>
563
584
 
564
585
  <span class='kw'>def</span> <span class='id identifier rubyid_ins'>ins</span><span class='lparen'>(</span><span class='id identifier rubyid_key'>key</span><span class='comma'>,</span> <span class='id identifier rubyid_value'>value</span><span class='comma'>,</span> <span class='id identifier rubyid_timestamp'>timestamp</span><span class='rparen'>)</span>
565
- <span class='id identifier rubyid_result'>result</span> <span class='op'>=</span> <span class='id identifier rubyid_connection'>connection</span><span class='period'>.</span><span class='id identifier rubyid_query'>query</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>TLOG</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>INS</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='id identifier rubyid_key'>key</span><span class='comma'>,</span> <span class='id identifier rubyid_value'>value</span><span class='comma'>,</span> <span class='id identifier rubyid_timestamp'>timestamp</span><span class='rparen'>)</span>
586
+ <span class='id identifier rubyid_timestamp'>timestamp</span> <span class='op'>=</span> <span class='const'>Time</span><span class='period'>.</span><span class='id identifier rubyid_parse'>parse</span><span class='lparen'>(</span><span class='id identifier rubyid_timestamp'>timestamp</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_utc'>utc</span><span class='period'>.</span><span class='id identifier rubyid_to_i'>to_i</span> <span class='kw'>if</span> <span class='id identifier rubyid_timestamp'>timestamp</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</span><span class='const'>String</span><span class='rparen'>)</span>
587
+ <span class='id identifier rubyid_result'>result</span> <span class='op'>=</span> <span class='id identifier rubyid_connection'>connection</span><span class='period'>.</span><span class='id identifier rubyid_query'>query</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>TLOG</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>INS</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='id identifier rubyid_key'>key</span><span class='comma'>,</span> <span class='id identifier rubyid_value'>value</span><span class='comma'>,</span> <span class='id identifier rubyid_timestamp'>timestamp</span><span class='rparen'>)</span>
566
588
 
567
589
  <span class='kw'>unless</span> <span class='id identifier rubyid_result'>result</span> <span class='op'>==</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>OK</span><span class='tstring_end'>&quot;</span></span>
568
590
  <span class='id identifier rubyid_raise'>raise</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Failed: TLOG INS </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_key'>key</span><span class='embexpr_end'>}</span><span class='tstring_content'> </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_value'>value</span><span class='embexpr_end'>}</span><span class='tstring_content'> </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_timestamp'>timestamp</span><span class='embexpr_end'>}</span><span class='tstring_end'>&quot;</span></span>
@@ -617,12 +639,12 @@ timestamps earlier than the cutoff timestamp.</p>
617
639
  <pre class="lines">
618
640
 
619
641
 
620
- 113
621
- 114
622
- 115</pre>
642
+ 126
643
+ 127
644
+ 128</pre>
623
645
  </td>
624
646
  <td>
625
- <pre class="code"><span class="info file"># File 'lib/jylis-rb/data_types/tlog.rb', line 113</span>
647
+ <pre class="code"><span class="info file"># File 'lib/jylis-rb/data_types/tlog.rb', line 126</span>
626
648
 
627
649
  <span class='kw'>def</span> <span class='id identifier rubyid_size'>size</span><span class='lparen'>(</span><span class='id identifier rubyid_key'>key</span><span class='rparen'>)</span>
628
650
  <span class='id identifier rubyid_connection'>connection</span><span class='period'>.</span><span class='id identifier rubyid_query'>query</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>TLOG</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>SIZE</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='id identifier rubyid_key'>key</span><span class='rparen'>)</span>
@@ -662,16 +684,16 @@ as calling #clr.</p>
662
684
  <pre class="lines">
663
685
 
664
686
 
665
- 137
666
- 138
667
- 139
668
- 140
669
- 141
670
- 142
671
- 143</pre>
687
+ 153
688
+ 154
689
+ 155
690
+ 156
691
+ 157
692
+ 158
693
+ 159</pre>
672
694
  </td>
673
695
  <td>
674
- <pre class="code"><span class="info file"># File 'lib/jylis-rb/data_types/tlog.rb', line 137</span>
696
+ <pre class="code"><span class="info file"># File 'lib/jylis-rb/data_types/tlog.rb', line 153</span>
675
697
 
676
698
  <span class='kw'>def</span> <span class='id identifier rubyid_trim'>trim</span><span class='lparen'>(</span><span class='id identifier rubyid_key'>key</span><span class='comma'>,</span> <span class='id identifier rubyid_count'>count</span><span class='rparen'>)</span>
677
699
  <span class='id identifier rubyid_result'>result</span> <span class='op'>=</span> <span class='id identifier rubyid_connection'>connection</span><span class='period'>.</span><span class='id identifier rubyid_query'>query</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>TLOG</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>TRIM</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='id identifier rubyid_key'>key</span><span class='comma'>,</span> <span class='id identifier rubyid_count'>count</span><span class='rparen'>)</span>
@@ -704,7 +726,27 @@ whose timestamp is earlier than the newly given `timestamp`.</p>
704
726
  </div>
705
727
  </div>
706
728
  <div class="tags">
729
+ <p class="tag_title">Parameters:</p>
730
+ <ul class="param">
731
+
732
+ <li>
733
+
734
+ <span class='name'>timestamp</span>
735
+
736
+
737
+ <span class='type'>(<tt>Integer</tt>, <tt>String</tt>)</span>
738
+
739
+
740
+
741
+ &mdash;
742
+ <div class='inline'>
743
+ <p>a unix or iso8601 formatted timestamp</p>
744
+ </div>
745
+
746
+ </li>
707
747
 
748
+ </ul>
749
+
708
750
 
709
751
  </div><table class="source_code">
710
752
  <tr>
@@ -712,19 +754,21 @@ whose timestamp is earlier than the newly given `timestamp`.</p>
712
754
  <pre class="lines">
713
755
 
714
756
 
715
- 124
716
- 125
717
- 126
718
- 127
719
- 128
720
- 129
721
- 130</pre>
757
+ 139
758
+ 140
759
+ 141
760
+ 142
761
+ 143
762
+ 144
763
+ 145
764
+ 146</pre>
722
765
  </td>
723
766
  <td>
724
- <pre class="code"><span class="info file"># File 'lib/jylis-rb/data_types/tlog.rb', line 124</span>
767
+ <pre class="code"><span class="info file"># File 'lib/jylis-rb/data_types/tlog.rb', line 139</span>
725
768
 
726
769
  <span class='kw'>def</span> <span class='id identifier rubyid_trimat'>trimat</span><span class='lparen'>(</span><span class='id identifier rubyid_key'>key</span><span class='comma'>,</span> <span class='id identifier rubyid_timestamp'>timestamp</span><span class='rparen'>)</span>
727
- <span class='id identifier rubyid_result'>result</span> <span class='op'>=</span> <span class='id identifier rubyid_connection'>connection</span><span class='period'>.</span><span class='id identifier rubyid_query'>query</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>TLOG</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>TRIMAT</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='id identifier rubyid_key'>key</span><span class='comma'>,</span> <span class='id identifier rubyid_timestamp'>timestamp</span><span class='rparen'>)</span>
770
+ <span class='id identifier rubyid_timestamp'>timestamp</span> <span class='op'>=</span> <span class='const'>Time</span><span class='period'>.</span><span class='id identifier rubyid_parse'>parse</span><span class='lparen'>(</span><span class='id identifier rubyid_timestamp'>timestamp</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_utc'>utc</span><span class='period'>.</span><span class='id identifier rubyid_to_i'>to_i</span> <span class='kw'>if</span> <span class='id identifier rubyid_timestamp'>timestamp</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</span><span class='const'>String</span><span class='rparen'>)</span>
771
+ <span class='id identifier rubyid_result'>result</span> <span class='op'>=</span> <span class='id identifier rubyid_connection'>connection</span><span class='period'>.</span><span class='id identifier rubyid_query'>query</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>TLOG</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>TRIMAT</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='id identifier rubyid_key'>key</span><span class='comma'>,</span> <span class='id identifier rubyid_timestamp'>timestamp</span><span class='rparen'>)</span>
728
772
 
729
773
  <span class='kw'>unless</span> <span class='id identifier rubyid_result'>result</span> <span class='op'>==</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>OK</span><span class='tstring_end'>&quot;</span></span>
730
774
  <span class='id identifier rubyid_raise'>raise</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Failed: TLOG TRIMAT </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_key'>key</span><span class='embexpr_end'>}</span><span class='tstring_content'> </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_timestamp'>timestamp</span><span class='embexpr_end'>}</span><span class='tstring_end'>&quot;</span></span>
@@ -740,7 +784,7 @@ whose timestamp is earlier than the newly given `timestamp`.</p>
740
784
  </div>
741
785
 
742
786
  <div id="footer">
743
- Generated on Sun Jun 3 21:47:00 2018 by
787
+ Generated on Tue Jun 5 17:01:51 2018 by
744
788
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
745
789
  0.9.14 (ruby-2.5.1).
746
790
  </div>