jylis-rb 0.0.1 → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (38) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +221 -0
  3. data/doc/Jylis.html +1087 -6
  4. data/doc/Jylis/Connection.html +1128 -0
  5. data/doc/Jylis/Connection/HostMissingError.html +135 -0
  6. data/doc/Jylis/Connection/UnsupportedSchemaError.html +135 -0
  7. data/doc/Jylis/DataType.html +135 -0
  8. data/doc/Jylis/DataType/Base.html +346 -0
  9. data/doc/Jylis/DataType/GCOUNT.html +331 -0
  10. data/doc/Jylis/DataType/GCOUNT/Result.html +132 -0
  11. data/doc/Jylis/DataType/MVREG.html +318 -0
  12. data/doc/Jylis/DataType/PNCOUNT.html +404 -0
  13. data/doc/Jylis/DataType/TLOG.html +750 -0
  14. data/doc/Jylis/DataType/TLOG/Result.html +640 -0
  15. data/doc/Jylis/DataType/TLOG/Row.html +616 -0
  16. data/doc/Jylis/DataType/TREG.html +345 -0
  17. data/doc/Jylis/DataType/TREG/Result.html +616 -0
  18. data/doc/Jylis/DataType/UJSON.html +549 -0
  19. data/doc/_index.html +185 -4
  20. data/doc/class_list.html +1 -1
  21. data/doc/file.README.html +223 -3
  22. data/doc/file.license.html +3 -3
  23. data/doc/frames.html +1 -1
  24. data/doc/index.html +223 -3
  25. data/doc/method_list.html +512 -0
  26. data/doc/top-level-namespace.html +3 -3
  27. data/lib/jylis-rb.rb +9 -0
  28. data/lib/jylis-rb/connection.rb +121 -0
  29. data/lib/jylis-rb/data_types/base.rb +24 -0
  30. data/lib/jylis-rb/data_types/gcount.rb +24 -0
  31. data/lib/jylis-rb/data_types/mvreg.rb +23 -0
  32. data/lib/jylis-rb/data_types/pncount.rb +33 -0
  33. data/lib/jylis-rb/data_types/tlog.rb +157 -0
  34. data/lib/jylis-rb/data_types/treg.rb +57 -0
  35. data/lib/jylis-rb/data_types/ujson.rb +87 -0
  36. data/lib/jylis-rb/jylis.rb +106 -0
  37. data/lib/jylis-rb/version.rb +1 -1
  38. metadata +39 -2
@@ -0,0 +1,318 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>
7
+ Class: Jylis::DataType::MVREG
8
+
9
+ &mdash; Documentation by YARD 0.9.14
10
+
11
+ </title>
12
+
13
+ <link rel="stylesheet" href="../../css/style.css" type="text/css" charset="utf-8" />
14
+
15
+ <link rel="stylesheet" href="../../css/common.css" type="text/css" charset="utf-8" />
16
+
17
+ <script type="text/javascript" charset="utf-8">
18
+ pathId = "Jylis::DataType::MVREG";
19
+ relpath = '../../';
20
+ </script>
21
+
22
+
23
+ <script type="text/javascript" charset="utf-8" src="../../js/jquery.js"></script>
24
+
25
+ <script type="text/javascript" charset="utf-8" src="../../js/app.js"></script>
26
+
27
+
28
+ </head>
29
+ <body>
30
+ <div class="nav_wrap">
31
+ <iframe id="nav" src="../../class_list.html?1"></iframe>
32
+ <div id="resizer"></div>
33
+ </div>
34
+
35
+ <div id="main" tabindex="-1">
36
+ <div id="header">
37
+ <div id="menu">
38
+
39
+ <a href="../../_index.html">Index (M)</a> &raquo;
40
+ <span class='title'><span class='object_link'><a href="../../Jylis.html" title="Jylis (class)">Jylis</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../DataType.html" title="Jylis::DataType (module)">DataType</a></span></span>
41
+ &raquo;
42
+ <span class="title">MVREG</span>
43
+
44
+ </div>
45
+
46
+ <div id="search">
47
+
48
+ <a class="full_list_link" id="class_list_link"
49
+ href="../../class_list.html">
50
+
51
+ <svg width="24" height="24">
52
+ <rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
53
+ <rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
54
+ <rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
55
+ </svg>
56
+ </a>
57
+
58
+ </div>
59
+ <div class="clear"></div>
60
+ </div>
61
+
62
+ <div id="content"><h1>Class: Jylis::DataType::MVREG
63
+
64
+
65
+
66
+ </h1>
67
+ <div class="box_info">
68
+
69
+ <dl>
70
+ <dt>Inherits:</dt>
71
+ <dd>
72
+ <span class="inheritName"><span class='object_link'><a href="Base.html" title="Jylis::DataType::Base (class)">Base</a></span></span>
73
+
74
+ <ul class="fullTree">
75
+ <li>Object</li>
76
+
77
+ <li class="next"><span class='object_link'><a href="Base.html" title="Jylis::DataType::Base (class)">Base</a></span></li>
78
+
79
+ <li class="next">Jylis::DataType::MVREG</li>
80
+
81
+ </ul>
82
+ <a href="#" class="inheritanceTree">show all</a>
83
+
84
+ </dd>
85
+ </dl>
86
+
87
+
88
+
89
+
90
+
91
+
92
+
93
+
94
+
95
+
96
+
97
+ <dl>
98
+ <dt>Defined in:</dt>
99
+ <dd>lib/jylis-rb/data_types/mvreg.rb</dd>
100
+ </dl>
101
+
102
+ </div>
103
+
104
+ <h2>Overview</h2><div class="docstring">
105
+ <div class="discussion">
106
+
107
+ <p>A multi-value register.</p>
108
+
109
+
110
+ </div>
111
+ </div>
112
+ <div class="tags">
113
+
114
+
115
+ <p class="tag_title">See Also:</p>
116
+ <ul class="see">
117
+
118
+ <li><a href="https://jemc.github.io/jylis/docs/types/mvreg/" target="_parent" title="https://jemc.github.io/jylis/docs/types/mvreg/">https://jemc.github.io/jylis/docs/types/mvreg/</a></li>
119
+
120
+ </ul>
121
+
122
+ </div>
123
+
124
+
125
+
126
+
127
+
128
+ <h2>Instance Attribute Summary</h2>
129
+
130
+ <h3 class="inherited">Attributes inherited from <span class='object_link'><a href="Base.html" title="Jylis::DataType::Base (class)">Base</a></span></h3>
131
+ <p class="inherited"><span class='object_link'><a href="Base.html#connection-instance_method" title="Jylis::DataType::Base#connection (method)">#connection</a></span></p>
132
+
133
+
134
+
135
+ <h2>
136
+ Instance Method Summary
137
+ <small><a href="#" class="summary_toggle">collapse</a></small>
138
+ </h2>
139
+
140
+ <ul class="summary">
141
+
142
+ <li class="public ">
143
+ <span class="summary_signature">
144
+
145
+ <a href="#get-instance_method" title="#get (instance method)">#<strong>get</strong>(key) &#x21d2; Object </a>
146
+
147
+
148
+
149
+ </span>
150
+
151
+
152
+
153
+
154
+
155
+
156
+
157
+
158
+
159
+ <span class="summary_desc"><div class='inline'>
160
+ <p>Get the latest value(s) for the register at `key`.</p>
161
+ </div></span>
162
+
163
+ </li>
164
+
165
+
166
+ <li class="public ">
167
+ <span class="summary_signature">
168
+
169
+ <a href="#set-instance_method" title="#set (instance method)">#<strong>set</strong>(key, value) &#x21d2; Object </a>
170
+
171
+
172
+
173
+ </span>
174
+
175
+
176
+
177
+
178
+
179
+
180
+
181
+
182
+
183
+ <span class="summary_desc"><div class='inline'>
184
+ <p>Set the latest `value` for the register at `key`.</p>
185
+ </div></span>
186
+
187
+ </li>
188
+
189
+
190
+ </ul>
191
+
192
+
193
+
194
+
195
+
196
+
197
+
198
+
199
+
200
+
201
+
202
+ <h3 class="inherited">Methods inherited from <span class='object_link'><a href="Base.html" title="Jylis::DataType::Base (class)">Base</a></span></h3>
203
+ <p class="inherited"><span class='object_link'><a href="Base.html#initialize-instance_method" title="Jylis::DataType::Base#initialize (method)">#initialize</a></span></p>
204
+ <div id="constructor_details" class="method_details_list">
205
+ <h2>Constructor Details</h2>
206
+
207
+ <p class="notice">This class inherits a constructor from <span class='object_link'><a href="Base.html#initialize-instance_method" title="Jylis::DataType::Base#initialize (method)">Jylis::DataType::Base</a></span></p>
208
+
209
+ </div>
210
+
211
+
212
+ <div id="instance_method_details" class="method_details_list">
213
+ <h2>Instance Method Details</h2>
214
+
215
+
216
+ <div class="method_details first">
217
+ <h3 class="signature first" id="get-instance_method">
218
+
219
+ #<strong>get</strong>(key) &#x21d2; <tt>Object</tt>
220
+
221
+
222
+
223
+
224
+
225
+ </h3><div class="docstring">
226
+ <div class="discussion">
227
+
228
+ <p>Get the latest value(s) for the register at `key`.</p>
229
+
230
+
231
+ </div>
232
+ </div>
233
+ <div class="tags">
234
+
235
+
236
+ </div><table class="source_code">
237
+ <tr>
238
+ <td>
239
+ <pre class="lines">
240
+
241
+
242
+ 9
243
+ 10
244
+ 11</pre>
245
+ </td>
246
+ <td>
247
+ <pre class="code"><span class="info file"># File 'lib/jylis-rb/data_types/mvreg.rb', line 9</span>
248
+
249
+ <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='rparen'>)</span>
250
+ <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'>MVREG</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='rparen'>)</span>
251
+ <span class='kw'>end</span></pre>
252
+ </td>
253
+ </tr>
254
+ </table>
255
+ </div>
256
+
257
+ <div class="method_details ">
258
+ <h3 class="signature " id="set-instance_method">
259
+
260
+ #<strong>set</strong>(key, value) &#x21d2; <tt>Object</tt>
261
+
262
+
263
+
264
+
265
+
266
+ </h3><div class="docstring">
267
+ <div class="discussion">
268
+
269
+ <p>Set the latest `value` for the register at `key`.</p>
270
+
271
+
272
+ </div>
273
+ </div>
274
+ <div class="tags">
275
+
276
+
277
+ </div><table class="source_code">
278
+ <tr>
279
+ <td>
280
+ <pre class="lines">
281
+
282
+
283
+ 14
284
+ 15
285
+ 16
286
+ 17
287
+ 18
288
+ 19
289
+ 20</pre>
290
+ </td>
291
+ <td>
292
+ <pre class="code"><span class="info file"># File 'lib/jylis-rb/data_types/mvreg.rb', line 14</span>
293
+
294
+ <span class='kw'>def</span> <span class='id identifier rubyid_set'>set</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='rparen'>)</span>
295
+ <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'>MVREG</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'>SET</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='rparen'>)</span>
296
+
297
+ <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>
298
+ <span class='id identifier rubyid_raise'>raise</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Failed: MVREG SET </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_end'>&quot;</span></span>
299
+ <span class='kw'>end</span>
300
+ <span class='kw'>end</span></pre>
301
+ </td>
302
+ </tr>
303
+ </table>
304
+ </div>
305
+
306
+ </div>
307
+
308
+ </div>
309
+
310
+ <div id="footer">
311
+ Generated on Sun Jun 3 21:47:00 2018 by
312
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
313
+ 0.9.14 (ruby-2.5.1).
314
+ </div>
315
+
316
+ </div>
317
+ </body>
318
+ </html>
@@ -0,0 +1,404 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>
7
+ Class: Jylis::DataType::PNCOUNT
8
+
9
+ &mdash; Documentation by YARD 0.9.14
10
+
11
+ </title>
12
+
13
+ <link rel="stylesheet" href="../../css/style.css" type="text/css" charset="utf-8" />
14
+
15
+ <link rel="stylesheet" href="../../css/common.css" type="text/css" charset="utf-8" />
16
+
17
+ <script type="text/javascript" charset="utf-8">
18
+ pathId = "Jylis::DataType::PNCOUNT";
19
+ relpath = '../../';
20
+ </script>
21
+
22
+
23
+ <script type="text/javascript" charset="utf-8" src="../../js/jquery.js"></script>
24
+
25
+ <script type="text/javascript" charset="utf-8" src="../../js/app.js"></script>
26
+
27
+
28
+ </head>
29
+ <body>
30
+ <div class="nav_wrap">
31
+ <iframe id="nav" src="../../class_list.html?1"></iframe>
32
+ <div id="resizer"></div>
33
+ </div>
34
+
35
+ <div id="main" tabindex="-1">
36
+ <div id="header">
37
+ <div id="menu">
38
+
39
+ <a href="../../_index.html">Index (P)</a> &raquo;
40
+ <span class='title'><span class='object_link'><a href="../../Jylis.html" title="Jylis (class)">Jylis</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../DataType.html" title="Jylis::DataType (module)">DataType</a></span></span>
41
+ &raquo;
42
+ <span class="title">PNCOUNT</span>
43
+
44
+ </div>
45
+
46
+ <div id="search">
47
+
48
+ <a class="full_list_link" id="class_list_link"
49
+ href="../../class_list.html">
50
+
51
+ <svg width="24" height="24">
52
+ <rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
53
+ <rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
54
+ <rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
55
+ </svg>
56
+ </a>
57
+
58
+ </div>
59
+ <div class="clear"></div>
60
+ </div>
61
+
62
+ <div id="content"><h1>Class: Jylis::DataType::PNCOUNT
63
+
64
+
65
+
66
+ </h1>
67
+ <div class="box_info">
68
+
69
+ <dl>
70
+ <dt>Inherits:</dt>
71
+ <dd>
72
+ <span class="inheritName"><span class='object_link'><a href="Base.html" title="Jylis::DataType::Base (class)">Base</a></span></span>
73
+
74
+ <ul class="fullTree">
75
+ <li>Object</li>
76
+
77
+ <li class="next"><span class='object_link'><a href="Base.html" title="Jylis::DataType::Base (class)">Base</a></span></li>
78
+
79
+ <li class="next">Jylis::DataType::PNCOUNT</li>
80
+
81
+ </ul>
82
+ <a href="#" class="inheritanceTree">show all</a>
83
+
84
+ </dd>
85
+ </dl>
86
+
87
+
88
+
89
+
90
+
91
+
92
+
93
+
94
+
95
+
96
+
97
+ <dl>
98
+ <dt>Defined in:</dt>
99
+ <dd>lib/jylis-rb/data_types/pncount.rb</dd>
100
+ </dl>
101
+
102
+ </div>
103
+
104
+ <h2>Overview</h2><div class="docstring">
105
+ <div class="discussion">
106
+
107
+ <p>A positive/negative counter.</p>
108
+
109
+
110
+ </div>
111
+ </div>
112
+ <div class="tags">
113
+
114
+
115
+ <p class="tag_title">See Also:</p>
116
+ <ul class="see">
117
+
118
+ <li><a href="https://jemc.github.io/jylis/docs/types/pncount/" target="_parent" title="https://jemc.github.io/jylis/docs/types/pncount/">https://jemc.github.io/jylis/docs/types/pncount/</a></li>
119
+
120
+ </ul>
121
+
122
+ </div>
123
+
124
+
125
+
126
+
127
+
128
+ <h2>Instance Attribute Summary</h2>
129
+
130
+ <h3 class="inherited">Attributes inherited from <span class='object_link'><a href="Base.html" title="Jylis::DataType::Base (class)">Base</a></span></h3>
131
+ <p class="inherited"><span class='object_link'><a href="Base.html#connection-instance_method" title="Jylis::DataType::Base#connection (method)">#connection</a></span></p>
132
+
133
+
134
+
135
+ <h2>
136
+ Instance Method Summary
137
+ <small><a href="#" class="summary_toggle">collapse</a></small>
138
+ </h2>
139
+
140
+ <ul class="summary">
141
+
142
+ <li class="public ">
143
+ <span class="summary_signature">
144
+
145
+ <a href="#dec-instance_method" title="#dec (instance method)">#<strong>dec</strong>(key, value) &#x21d2; Object </a>
146
+
147
+
148
+
149
+ </span>
150
+
151
+
152
+
153
+
154
+
155
+
156
+
157
+
158
+
159
+ <span class="summary_desc"><div class='inline'>
160
+ <p>Decrease the counter at `key` by the amount of `value`.</p>
161
+ </div></span>
162
+
163
+ </li>
164
+
165
+
166
+ <li class="public ">
167
+ <span class="summary_signature">
168
+
169
+ <a href="#get-instance_method" title="#get (instance method)">#<strong>get</strong>(key) &#x21d2; Integer </a>
170
+
171
+
172
+
173
+ </span>
174
+
175
+
176
+
177
+
178
+
179
+
180
+
181
+
182
+
183
+ <span class="summary_desc"><div class='inline'>
184
+ <p>Get the resulting `value` for the counter at `key`.</p>
185
+ </div></span>
186
+
187
+ </li>
188
+
189
+
190
+ <li class="public ">
191
+ <span class="summary_signature">
192
+
193
+ <a href="#inc-instance_method" title="#inc (instance method)">#<strong>inc</strong>(key, value) &#x21d2; Object </a>
194
+
195
+
196
+
197
+ </span>
198
+
199
+
200
+
201
+
202
+
203
+
204
+
205
+
206
+
207
+ <span class="summary_desc"><div class='inline'>
208
+ <p>Increase the counter at `key` by the amount of `value`.</p>
209
+ </div></span>
210
+
211
+ </li>
212
+
213
+
214
+ </ul>
215
+
216
+
217
+
218
+
219
+
220
+
221
+
222
+
223
+
224
+
225
+
226
+ <h3 class="inherited">Methods inherited from <span class='object_link'><a href="Base.html" title="Jylis::DataType::Base (class)">Base</a></span></h3>
227
+ <p class="inherited"><span class='object_link'><a href="Base.html#initialize-instance_method" title="Jylis::DataType::Base#initialize (method)">#initialize</a></span></p>
228
+ <div id="constructor_details" class="method_details_list">
229
+ <h2>Constructor Details</h2>
230
+
231
+ <p class="notice">This class inherits a constructor from <span class='object_link'><a href="Base.html#initialize-instance_method" title="Jylis::DataType::Base#initialize (method)">Jylis::DataType::Base</a></span></p>
232
+
233
+ </div>
234
+
235
+
236
+ <div id="instance_method_details" class="method_details_list">
237
+ <h2>Instance Method Details</h2>
238
+
239
+
240
+ <div class="method_details first">
241
+ <h3 class="signature first" id="dec-instance_method">
242
+
243
+ #<strong>dec</strong>(key, value) &#x21d2; <tt>Object</tt>
244
+
245
+
246
+
247
+
248
+
249
+ </h3><div class="docstring">
250
+ <div class="discussion">
251
+
252
+ <p>Decrease the counter at `key` by the amount of `value`.</p>
253
+
254
+
255
+ </div>
256
+ </div>
257
+ <div class="tags">
258
+
259
+
260
+ </div><table class="source_code">
261
+ <tr>
262
+ <td>
263
+ <pre class="lines">
264
+
265
+
266
+ 24
267
+ 25
268
+ 26
269
+ 27
270
+ 28
271
+ 29
272
+ 30</pre>
273
+ </td>
274
+ <td>
275
+ <pre class="code"><span class="info file"># File 'lib/jylis-rb/data_types/pncount.rb', line 24</span>
276
+
277
+ <span class='kw'>def</span> <span class='id identifier rubyid_dec'>dec</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='rparen'>)</span>
278
+ <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'>PNCOUNT</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'>DEC</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='rparen'>)</span>
279
+
280
+ <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>
281
+ <span class='id identifier rubyid_raise'>raise</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Failed: PNCOUNT DEC </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_end'>&quot;</span></span>
282
+ <span class='kw'>end</span>
283
+ <span class='kw'>end</span></pre>
284
+ </td>
285
+ </tr>
286
+ </table>
287
+ </div>
288
+
289
+ <div class="method_details ">
290
+ <h3 class="signature " id="get-instance_method">
291
+
292
+ #<strong>get</strong>(key) &#x21d2; <tt>Integer</tt>
293
+
294
+
295
+
296
+
297
+
298
+ </h3><div class="docstring">
299
+ <div class="discussion">
300
+
301
+ <p>Get the resulting `value` for the counter at `key`.</p>
302
+
303
+
304
+ </div>
305
+ </div>
306
+ <div class="tags">
307
+
308
+ <p class="tag_title">Returns:</p>
309
+ <ul class="return">
310
+
311
+ <li>
312
+
313
+
314
+ <span class='type'>(<tt>Integer</tt>)</span>
315
+
316
+
317
+
318
+ </li>
319
+
320
+ </ul>
321
+
322
+ </div><table class="source_code">
323
+ <tr>
324
+ <td>
325
+ <pre class="lines">
326
+
327
+
328
+ 10
329
+ 11
330
+ 12</pre>
331
+ </td>
332
+ <td>
333
+ <pre class="code"><span class="info file"># File 'lib/jylis-rb/data_types/pncount.rb', line 10</span>
334
+
335
+ <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='rparen'>)</span>
336
+ <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'>PNCOUNT</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='rparen'>)</span>
337
+ <span class='kw'>end</span></pre>
338
+ </td>
339
+ </tr>
340
+ </table>
341
+ </div>
342
+
343
+ <div class="method_details ">
344
+ <h3 class="signature " id="inc-instance_method">
345
+
346
+ #<strong>inc</strong>(key, value) &#x21d2; <tt>Object</tt>
347
+
348
+
349
+
350
+
351
+
352
+ </h3><div class="docstring">
353
+ <div class="discussion">
354
+
355
+ <p>Increase the counter at `key` by the amount of `value`.</p>
356
+
357
+
358
+ </div>
359
+ </div>
360
+ <div class="tags">
361
+
362
+
363
+ </div><table class="source_code">
364
+ <tr>
365
+ <td>
366
+ <pre class="lines">
367
+
368
+
369
+ 15
370
+ 16
371
+ 17
372
+ 18
373
+ 19
374
+ 20
375
+ 21</pre>
376
+ </td>
377
+ <td>
378
+ <pre class="code"><span class="info file"># File 'lib/jylis-rb/data_types/pncount.rb', line 15</span>
379
+
380
+ <span class='kw'>def</span> <span class='id identifier rubyid_inc'>inc</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='rparen'>)</span>
381
+ <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'>PNCOUNT</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'>INC</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='rparen'>)</span>
382
+
383
+ <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>
384
+ <span class='id identifier rubyid_raise'>raise</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Failed: PNCOUNT INC </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_end'>&quot;</span></span>
385
+ <span class='kw'>end</span>
386
+ <span class='kw'>end</span></pre>
387
+ </td>
388
+ </tr>
389
+ </table>
390
+ </div>
391
+
392
+ </div>
393
+
394
+ </div>
395
+
396
+ <div id="footer">
397
+ Generated on Sun Jun 3 21:47:00 2018 by
398
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
399
+ 0.9.14 (ruby-2.5.1).
400
+ </div>
401
+
402
+ </div>
403
+ </body>
404
+ </html>