inline_transforms 0.3.0 → 0.3.1

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.
@@ -1,519 +0,0 @@
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
- Module: InlineTransforms
8
-
9
- &mdash; Documentation by YARD 0.9.45
10
-
11
- </title>
12
-
13
- <link rel="stylesheet" href="css/style.css" type="text/css">
14
-
15
- <link rel="stylesheet" href="css/common.css" type="text/css">
16
-
17
- <script type="text/javascript">
18
- pathId = "InlineTransforms";
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 id="main_progress" aria-hidden="true"></div>
31
-
32
- <div class="nav_wrap">
33
- <iframe id="nav" src="class_list.html?1"></iframe>
34
- <div id="resizer"></div>
35
- </div>
36
-
37
- <div id="main" tabindex="-1">
38
- <div id="header">
39
- <div id="menu">
40
-
41
- <a href="_index.html">Index (I)</a> &raquo;
42
-
43
-
44
- <span class="title">InlineTransforms</span>
45
-
46
- </div>
47
-
48
- <div id="search">
49
-
50
- <a class="full_list_link" id="class_list_link"
51
- href="class_list.html">
52
-
53
- <svg width="24" height="24">
54
- <rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
55
- <rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
56
- <rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
57
- </svg>
58
- </a>
59
-
60
- </div>
61
- <div class="clear"></div>
62
- </div>
63
-
64
- <div id="content"><h1>Module: InlineTransforms
65
-
66
-
67
-
68
- </h1>
69
- <div class="box_info">
70
-
71
-
72
-
73
-
74
-
75
-
76
-
77
-
78
-
79
- <dl>
80
- <dt>Included in:</dt>
81
- <dd><span class='object_link'><a href="Object.html" title="Object (class)">Object</a></span></dd>
82
- </dl>
83
-
84
-
85
-
86
- <dl>
87
- <dt>Defined in:</dt>
88
- <dd>lib/inline_transforms.rb<span class="defines">,<br>
89
- lib/inline_transforms/version.rb</span>
90
-
91
- </dd>
92
- </dl>
93
-
94
- </div>
95
-
96
- <h2>Overview</h2><div class="docstring">
97
- <div class="discussion">
98
- <p>Defines <code>only_if</code>, <code>unless</code>, and <code>transform</code>, which we'll then want to make available in <code>Object</code> instances.</p>
99
-
100
- </div>
101
- </div>
102
- <div class="tags">
103
-
104
-
105
- </div>
106
-
107
- <h2>
108
- Constant Summary
109
- <small><a href="#" class="constants_summary_toggle">collapse</a></small>
110
- </h2>
111
-
112
- <dl class="constants">
113
-
114
- <dt id="VERSION-constant" class="">VERSION =
115
-
116
- </dt>
117
- <dd><pre class="code"><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>0.3.0</span><span class='tstring_end'>&#39;</span></span><span class='period'>.</span><span class='id identifier rubyid_freeze'>freeze</span></pre></dd>
118
-
119
- </dl>
120
-
121
-
122
-
123
-
124
-
125
-
126
-
127
-
128
-
129
- <h2>
130
- Instance Method Summary
131
- <small><a href="#" class="summary_toggle">collapse</a></small>
132
- </h2>
133
-
134
- <ul class="summary">
135
-
136
- <li class="public ">
137
- <span class="summary_signature">
138
-
139
- <a href="#only_if-instance_method" title="#only_if (instance method)">#<strong>only_if</strong>(good_value, **options) &#x21d2; Object </a>
140
-
141
-
142
-
143
- </span>
144
-
145
-
146
-
147
-
148
-
149
-
150
-
151
-
152
-
153
- <span class="summary_desc"><div class='inline'><p>Returns <code>self</code> <em>only if</em> it matches a &quot;good&quot; value; otherwise returns an alternate (<code>else:</code>) value.</p></div></span>
154
-
155
- </li>
156
-
157
-
158
- <li class="public ">
159
- <span class="summary_signature">
160
-
161
- <a href="#transform-instance_method" title="#transform (instance method)">#<strong>transform</strong>(**options) &#x21d2; Object </a>
162
-
163
-
164
-
165
- </span>
166
-
167
-
168
-
169
-
170
-
171
-
172
-
173
-
174
-
175
- <span class="summary_desc"><div class='inline'><p>Returns <code>self</code> ...</p></div></span>
176
-
177
- </li>
178
-
179
-
180
- <li class="public ">
181
- <span class="summary_signature">
182
-
183
- <a href="#unless-instance_method" title="#unless (instance method)">#<strong>unless</strong>(bad_value, **options) &#x21d2; Object </a>
184
-
185
-
186
-
187
- </span>
188
-
189
-
190
-
191
-
192
-
193
-
194
-
195
-
196
-
197
- <span class="summary_desc"><div class='inline'><p>Returns <code>self</code> ...</p></div></span>
198
-
199
- </li>
200
-
201
-
202
- </ul>
203
-
204
-
205
-
206
-
207
-
208
- <div id="instance_method_details" class="method_details_list">
209
- <h2>Instance Method Details</h2>
210
-
211
-
212
- <div class="method_details first">
213
- <h3 class="signature first" id="only_if-instance_method">
214
-
215
- #<strong>only_if</strong>(good_value, **options) &#x21d2; <tt><span class='object_link'><a href="Object.html" title="Object (class)">Object</a></span></tt>
216
-
217
-
218
-
219
-
220
-
221
- </h3><div class="docstring">
222
- <div class="discussion">
223
- <p>Returns <code>self</code> <em>only if</em> it matches a &quot;good&quot; value; otherwise returns an alternate (<code>else:</code>) value.</p>
224
- <p>(NOTE: this takes an <code>else: nil</code> named param, but is defined as taking <code>(**options)</code> because <code>else</code> is reserved.)</p>
225
-
226
- </div>
227
- </div>
228
- <div class="tags">
229
- <p class="tag_title">Parameters:</p>
230
- <ul class="param">
231
-
232
- <li>
233
-
234
- <span class='name'>good_value</span>
235
-
236
-
237
- <span class='type'>(<tt><span class='object_link'><a href="Object.html" title="Object (class)">Object</a></span></tt>)</span>
238
-
239
-
240
-
241
- &mdash;
242
- <div class='inline'><p>The one value we consider &quot;good&quot;, and for which we'd like <code>self</code> returned.</p></div>
243
-
244
- </li>
245
-
246
- <li>
247
-
248
- <span class='name'>else:</span>
249
-
250
-
251
- <span class='type'>(<tt>Hash</tt>)</span>
252
-
253
-
254
-
255
- &mdash;
256
- <div class='inline'><p>a customizable set of options</p></div>
257
-
258
- </li>
259
-
260
- </ul>
261
-
262
-
263
-
264
-
265
-
266
-
267
-
268
- <p class="tag_title">Returns:</p>
269
- <ul class="return">
270
-
271
- <li>
272
-
273
-
274
- <span class='type'></span>
275
-
276
-
277
-
278
-
279
- <div class='inline'><p>Returns either <code>self</code> or the value given as the <code>else:</code> option.</p></div>
280
-
281
- </li>
282
-
283
- </ul>
284
-
285
- </div><table class="source_code">
286
- <tr>
287
- <td>
288
- <pre class="lines">
289
-
290
-
291
- 26
292
- 27
293
- 28
294
- 29
295
- 30</pre>
296
- </td>
297
- <td>
298
- <pre class="code"><span class="info file"># File 'lib/inline_transforms.rb', line 26</span>
299
-
300
- <span class='kw'>def</span> <span class='id identifier rubyid_only_if'>only_if</span><span class='lparen'>(</span><span class='id identifier rubyid_good_value'>good_value</span><span class='comma'>,</span> <span class='op'>**</span><span class='id identifier rubyid_options'>options</span><span class='rparen'>)</span>
301
- <span class='kw'>return</span> <span class='kw'>self</span> <span class='kw'>if</span> <span class='id identifier rubyid_inline_transforms_equality?'>inline_transforms_equality?</span> <span class='id identifier rubyid_good_value'>good_value</span>
302
-
303
- <span class='id identifier rubyid_inline_transforms_response_processor'>inline_transforms_response_processor</span> <span class='id identifier rubyid_options'>options</span><span class='lbracket'>[</span><span class='symbol'>:else</span><span class='rbracket'>]</span>
304
- <span class='kw'>end</span></pre>
305
- </td>
306
- </tr>
307
- </table>
308
- </div>
309
-
310
- <div class="method_details ">
311
- <h3 class="signature " id="transform-instance_method">
312
-
313
- #<strong>transform</strong>(**options) &#x21d2; <tt><span class='object_link'><a href="Object.html" title="Object (class)">Object</a></span></tt>
314
-
315
-
316
-
317
-
318
-
319
- </h3><div class="docstring">
320
- <div class="discussion">
321
- <p>Returns <code>self</code> ... unless it matches one of the keys in the given &quot;transformation hash&quot;, in which case the
322
- corresponding hash value is returned. If no matching hash key is found, this returns a fallback (<code>else:</code>) value.</p>
323
- <p>(NOTE: this takes an <code>else: nil</code> named param, but is defined as taking <code>(**options)</code> because <code>else</code> is reserved.)</p>
324
-
325
- </div>
326
- </div>
327
- <div class="tags">
328
- <p class="tag_title">Parameters:</p>
329
- <ul class="param">
330
-
331
- <li>
332
-
333
- <span class='name'>**</span>
334
-
335
-
336
- <span class='type'>(<tt>Hash</tt>)</span>
337
-
338
-
339
-
340
- &mdash;
341
- <div class='inline'><p>a customizable set of options</p></div>
342
-
343
- </li>
344
-
345
- <li>
346
-
347
- <span class='name'>else:</span>
348
-
349
-
350
- <span class='type'>(<tt>Hash</tt>)</span>
351
-
352
-
353
-
354
- &mdash;
355
- <div class='inline'><p>a customizable set of options</p></div>
356
-
357
- </li>
358
-
359
- </ul>
360
-
361
-
362
-
363
-
364
-
365
- <p class="tag_title">Returns:</p>
366
- <ul class="return">
367
-
368
- <li>
369
-
370
-
371
- <span class='type'></span>
372
-
373
-
374
-
375
-
376
- <div class='inline'><p>Returns either <code>self</code>, one of the transformation hash values, or the <code>else:</code> option.</p></div>
377
-
378
- </li>
379
-
380
- </ul>
381
-
382
- </div><table class="source_code">
383
- <tr>
384
- <td>
385
- <pre class="lines">
386
-
387
-
388
- 68
389
- 69
390
- 70
391
- 71
392
- 72
393
- 73</pre>
394
- </td>
395
- <td>
396
- <pre class="code"><span class="info file"># File 'lib/inline_transforms.rb', line 68</span>
397
-
398
- <span class='kw'>def</span> <span class='id identifier rubyid_transform'>transform</span><span class='lparen'>(</span><span class='op'>**</span><span class='id identifier rubyid_options'>options</span><span class='rparen'>)</span>
399
- <span class='id identifier rubyid_default'>default</span> <span class='op'>=</span> <span class='id identifier rubyid_options'>options</span><span class='period'>.</span><span class='id identifier rubyid_delete'>delete</span> <span class='symbol'>:else</span>
400
-
401
- <span class='id identifier rubyid_options'>options</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_key'>key</span><span class='comma'>,</span> <span class='id identifier rubyid_value'>value</span><span class='op'>|</span> <span class='kw'>return</span> <span class='id identifier rubyid_inline_transforms_response_processor'>inline_transforms_response_processor</span> <span class='id identifier rubyid_value'>value</span> <span class='kw'>if</span> <span class='id identifier rubyid_inline_transforms_equality?'>inline_transforms_equality?</span> <span class='id identifier rubyid_key'>key</span> <span class='rbrace'>}</span>
402
- <span class='id identifier rubyid_inline_transforms_response_processor'>inline_transforms_response_processor</span> <span class='id identifier rubyid_default'>default</span>
403
- <span class='kw'>end</span></pre>
404
- </td>
405
- </tr>
406
- </table>
407
- </div>
408
-
409
- <div class="method_details ">
410
- <h3 class="signature " id="unless-instance_method">
411
-
412
- #<strong>unless</strong>(bad_value, **options) &#x21d2; <tt><span class='object_link'><a href="Object.html" title="Object (class)">Object</a></span></tt>
413
-
414
-
415
-
416
-
417
-
418
- </h3><div class="docstring">
419
- <div class="discussion">
420
- <p>Returns <code>self</code> ... unless it matches a &quot;bad&quot; value, in which case it returns an alternate (<code>then:</code>) value.</p>
421
- <p>(NOTE: this takes a <code>then: nil</code> named param, but is defined as taking <code>(**options)</code> because <code>then</code> is reserved.)</p>
422
-
423
- </div>
424
- </div>
425
- <div class="tags">
426
- <p class="tag_title">Parameters:</p>
427
- <ul class="param">
428
-
429
- <li>
430
-
431
- <span class='name'>bad_value</span>
432
-
433
-
434
- <span class='type'>(<tt><span class='object_link'><a href="Object.html" title="Object (class)">Object</a></span></tt>)</span>
435
-
436
-
437
-
438
- &mdash;
439
- <div class='inline'><p>The one value we consider &quot;bad&quot;, and for which we'd like the <code>then:</code> option back instead.</p></div>
440
-
441
- </li>
442
-
443
- <li>
444
-
445
- <span class='name'>then:</span>
446
-
447
-
448
- <span class='type'>(<tt>Hash</tt>)</span>
449
-
450
-
451
-
452
- &mdash;
453
- <div class='inline'><p>a customizable set of options</p></div>
454
-
455
- </li>
456
-
457
- </ul>
458
-
459
-
460
-
461
-
462
-
463
-
464
-
465
- <p class="tag_title">Returns:</p>
466
- <ul class="return">
467
-
468
- <li>
469
-
470
-
471
- <span class='type'></span>
472
-
473
-
474
-
475
-
476
- <div class='inline'><p>Returns either <code>self</code> or the value given as the <code>then:</code> option.</p></div>
477
-
478
- </li>
479
-
480
- </ul>
481
-
482
- </div><table class="source_code">
483
- <tr>
484
- <td>
485
- <pre class="lines">
486
-
487
-
488
- 47
489
- 48
490
- 49
491
- 50
492
- 51</pre>
493
- </td>
494
- <td>
495
- <pre class="code"><span class="info file"># File 'lib/inline_transforms.rb', line 47</span>
496
-
497
- <span class='kw'>def</span> <span class='kw'>unless</span><span class='lparen'>(</span><span class='id identifier rubyid_bad_value'>bad_value</span><span class='comma'>,</span> <span class='op'>**</span><span class='id identifier rubyid_options'>options</span><span class='rparen'>)</span>
498
- <span class='kw'>return</span> <span class='kw'>self</span> <span class='kw'>unless</span> <span class='id identifier rubyid_inline_transforms_equality?'>inline_transforms_equality?</span> <span class='id identifier rubyid_bad_value'>bad_value</span>
499
-
500
- <span class='id identifier rubyid_inline_transforms_response_processor'>inline_transforms_response_processor</span> <span class='id identifier rubyid_options'>options</span><span class='lbracket'>[</span><span class='symbol'>:then</span><span class='rbracket'>]</span>
501
- <span class='kw'>end</span></pre>
502
- </td>
503
- </tr>
504
- </table>
505
- </div>
506
-
507
- </div>
508
-
509
- </div>
510
-
511
- <div id="footer">
512
- Generated on Wed Aug 26 23:26:19 2026 by
513
- <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
514
- 0.9.45 (ruby-3.4.8).
515
- </div>
516
-
517
- </div>
518
- </body>
519
- </html>
data/docs/Object.html DELETED
@@ -1,148 +0,0 @@
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: Object
8
-
9
- &mdash; Documentation by YARD 0.9.45
10
-
11
- </title>
12
-
13
- <link rel="stylesheet" href="css/style.css" type="text/css">
14
-
15
- <link rel="stylesheet" href="css/common.css" type="text/css">
16
-
17
- <script type="text/javascript">
18
- pathId = "Object";
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 id="main_progress" aria-hidden="true"></div>
31
-
32
- <div class="nav_wrap">
33
- <iframe id="nav" src="class_list.html?1"></iframe>
34
- <div id="resizer"></div>
35
- </div>
36
-
37
- <div id="main" tabindex="-1">
38
- <div id="header">
39
- <div id="menu">
40
-
41
- <a href="_index.html">Index (O)</a> &raquo;
42
-
43
-
44
- <span class="title">Object</span>
45
-
46
- </div>
47
-
48
- <div id="search">
49
-
50
- <a class="full_list_link" id="class_list_link"
51
- href="class_list.html">
52
-
53
- <svg width="24" height="24">
54
- <rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
55
- <rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
56
- <rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
57
- </svg>
58
- </a>
59
-
60
- </div>
61
- <div class="clear"></div>
62
- </div>
63
-
64
- <div id="content"><h1>Class: Object
65
-
66
-
67
-
68
- </h1>
69
- <div class="box_info">
70
-
71
- <dl>
72
- <dt>Inherits:</dt>
73
- <dd>
74
- <span class="inheritName">BasicObject</span>
75
-
76
- </dd>
77
- </dl>
78
-
79
-
80
-
81
-
82
-
83
-
84
- <dl>
85
- <dt>Includes:</dt>
86
- <dd><span class='object_link'><a href="InlineTransforms.html" title="InlineTransforms (module)">InlineTransforms</a></span></dd>
87
- </dl>
88
-
89
-
90
-
91
-
92
-
93
-
94
- <dl>
95
- <dt>Defined in:</dt>
96
- <dd>lib/inline_transforms.rb
97
- </dd>
98
- </dl>
99
-
100
- </div>
101
-
102
- <h2>Overview</h2><div class="docstring">
103
- <div class="discussion">
104
- <p>Gets the <code>InlineTransforms</code> methods.</p>
105
-
106
- </div>
107
- </div>
108
- <div class="tags">
109
-
110
-
111
- </div>
112
-
113
-
114
- <h2>Constant Summary</h2>
115
-
116
- <h3 class="inherited">Constants included
117
- from <span class='object_link'><a href="InlineTransforms.html" title="InlineTransforms (module)">InlineTransforms</a></span></h3>
118
- <p class="inherited"><span class='object_link'><a href="InlineTransforms.html#VERSION-constant" title="InlineTransforms::VERSION (constant)">InlineTransforms::VERSION</a></span></p>
119
-
120
-
121
-
122
-
123
-
124
-
125
-
126
-
127
-
128
-
129
-
130
-
131
-
132
- <h2>Method Summary</h2>
133
-
134
- <h3 class="inherited">Methods included from <span class='object_link'><a href="InlineTransforms.html" title="InlineTransforms (module)">InlineTransforms</a></span></h3>
135
- <p class="inherited"><span class='object_link'><a href="InlineTransforms.html#only_if-instance_method" title="InlineTransforms#only_if (method)">#only_if</a></span>, <span class='object_link'><a href="InlineTransforms.html#transform-instance_method" title="InlineTransforms#transform (method)">#transform</a></span>, <span class='object_link'><a href="InlineTransforms.html#unless-instance_method" title="InlineTransforms#unless (method)">#unless</a></span></p>
136
-
137
-
138
- </div>
139
-
140
- <div id="footer">
141
- Generated on Wed Aug 26 23:26:20 2026 by
142
- <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
143
- 0.9.45 (ruby-3.4.8).
144
- </div>
145
-
146
- </div>
147
- </body>
148
- </html>