doing 2.0.9.pre → 2.0.10
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 +4 -4
- data/.yardoc/checksums +20 -0
- data/.yardoc/complete +0 -0
- data/.yardoc/object_types +0 -0
- data/.yardoc/objects/root.dat +0 -0
- data/.yardoc/proxy_types +0 -0
- data/.yardopts +1 -0
- data/CHANGELOG.md +1 -1
- data/Gemfile.lock +30 -10
- data/README.md +1 -1
- data/Rakefile +8 -1
- data/bin/doing +76 -30
- data/doc/Array.html +135 -0
- data/doc/Doing/Color.html +506 -0
- data/doc/Doing/Configuration.html +680 -0
- data/doc/Doing/Errors/DoingNoTraceError.html +186 -0
- data/doc/Doing/Errors/DoingRuntimeError.html +186 -0
- data/doc/Doing/Errors/DoingStandardError.html +186 -0
- data/doc/Doing/Errors/EmptyInput.html +186 -0
- data/doc/Doing/Errors/NoResults.html +186 -0
- data/doc/Doing/Errors/PluginException.html +248 -0
- data/doc/Doing/Errors/UserCancelled.html +186 -0
- data/doc/Doing/Errors/WrongCommand.html +186 -0
- data/doc/Doing/Errors.html +191 -0
- data/doc/Doing/Hooks.html +364 -0
- data/doc/Doing/Item.html +1385 -0
- data/doc/Doing/Items.html +393 -0
- data/doc/Doing/LogAdapter.html +1650 -0
- data/doc/Doing/Note.html +535 -0
- data/doc/Doing/Pager.html +268 -0
- data/doc/Doing/Plugins.html +849 -0
- data/doc/Doing/Util.html +870 -0
- data/doc/Doing/WWID.html +4827 -0
- data/doc/Doing.html +145 -0
- data/doc/GLI/Commands/MarkdownDocumentListener.html +763 -0
- data/doc/GLI/Commands.html +115 -0
- data/doc/GLI.html +115 -0
- data/doc/Hash.html +332 -0
- data/doc/Status.html +292 -0
- data/doc/String.html +1714 -0
- data/doc/Symbol.html +250 -0
- data/doc/Time.html +182 -0
- data/doc/_index.html +411 -0
- data/doc/class_list.html +51 -0
- data/doc/css/common.css +1 -0
- data/doc/css/full_list.css +58 -0
- data/doc/css/style.css +497 -0
- data/doc/file.README.html +123 -0
- data/doc/file_list.html +56 -0
- data/doc/frames.html +17 -0
- data/doc/index.html +123 -0
- data/doc/js/app.js +314 -0
- data/doc/js/full_list.js +216 -0
- data/doc/js/jquery.js +4 -0
- data/doc/method_list.html +1867 -0
- data/doc/top-level-namespace.html +112 -0
- data/doing.gemspec +5 -1
- data/doing.rdoc +86 -16
- data/example_plugin.rb +6 -6
- data/lib/doing/array.rb +1 -1
- data/lib/doing/configuration.rb +14 -12
- data/lib/doing/hash.rb +1 -1
- data/lib/doing/item.rb +101 -17
- data/lib/doing/log_adapter.rb +123 -113
- data/lib/doing/note.rb +1 -1
- data/lib/doing/plugin_manager.rb +5 -5
- data/lib/doing/plugins/export/csv_export.rb +1 -1
- data/lib/doing/plugins/export/template_export.rb +5 -7
- data/lib/doing/plugins/import/calendar_import.rb +1 -1
- data/lib/doing/plugins/import/doing_import.rb +4 -4
- data/lib/doing/plugins/import/timing_import.rb +5 -3
- data/lib/doing/string.rb +75 -22
- data/lib/doing/symbol.rb +9 -5
- data/lib/doing/time.rb +1 -1
- data/lib/doing/util.rb +18 -11
- data/lib/doing/version.rb +1 -1
- data/lib/doing/wwid.rb +419 -326
- data/lib/doing/wwidfile.rb +5 -5
- data/lib/doing.rb +2 -1
- data/lib/examples/plugins/say_export.rb +6 -6
- data/rdocfixer.rb +1 -1
- data/yard_templates/default/method_details/setup.rb +3 -0
- metadata +117 -4
data/doc/String.html
ADDED
@@ -0,0 +1,1714 @@
|
|
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: String
|
8
|
+
|
9
|
+
— Documentation by YARD 0.9.26
|
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 = "String";
|
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 (S)</a> »
|
40
|
+
|
41
|
+
|
42
|
+
<span class="title">String</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: String
|
63
|
+
|
64
|
+
|
65
|
+
|
66
|
+
</h1>
|
67
|
+
<div class="box_info">
|
68
|
+
|
69
|
+
<dl>
|
70
|
+
<dt>Inherits:</dt>
|
71
|
+
<dd>
|
72
|
+
<span class="inheritName">Object</span>
|
73
|
+
|
74
|
+
<ul class="fullTree">
|
75
|
+
<li>Object</li>
|
76
|
+
|
77
|
+
<li class="next">String</li>
|
78
|
+
|
79
|
+
</ul>
|
80
|
+
<a href="#" class="inheritanceTree">show all</a>
|
81
|
+
|
82
|
+
</dd>
|
83
|
+
</dl>
|
84
|
+
|
85
|
+
|
86
|
+
|
87
|
+
|
88
|
+
|
89
|
+
|
90
|
+
<dl>
|
91
|
+
<dt>Includes:</dt>
|
92
|
+
<dd><span class='object_link'><a href="Doing/Color.html" title="Doing::Color (module)">Doing::Color</a></span></dd>
|
93
|
+
</dl>
|
94
|
+
|
95
|
+
|
96
|
+
|
97
|
+
|
98
|
+
|
99
|
+
|
100
|
+
<dl>
|
101
|
+
<dt>Defined in:</dt>
|
102
|
+
<dd>lib/doing/string.rb</dd>
|
103
|
+
</dl>
|
104
|
+
|
105
|
+
</div>
|
106
|
+
|
107
|
+
<h2>Overview</h2><div class="docstring">
|
108
|
+
<div class="discussion">
|
109
|
+
<p>String helpers</p>
|
110
|
+
|
111
|
+
|
112
|
+
</div>
|
113
|
+
</div>
|
114
|
+
<div class="tags">
|
115
|
+
|
116
|
+
|
117
|
+
</div>
|
118
|
+
|
119
|
+
|
120
|
+
<h2>Constant Summary</h2>
|
121
|
+
|
122
|
+
<h3 class="inherited">Constants included
|
123
|
+
from <span class='object_link'><a href="Doing/Color.html" title="Doing::Color (module)">Doing::Color</a></span></h3>
|
124
|
+
<p class="inherited"><span class='object_link'><a href="Doing/Color.html#ATTRIBUTES-constant" title="Doing::Color::ATTRIBUTES (constant)">Doing::Color::ATTRIBUTES</a></span>, <span class='object_link'><a href="Doing/Color.html#ATTRIBUTE_NAMES-constant" title="Doing::Color::ATTRIBUTE_NAMES (constant)">Doing::Color::ATTRIBUTE_NAMES</a></span>, <span class='object_link'><a href="Doing/Color.html#COLORED_REGEXP-constant" title="Doing::Color::COLORED_REGEXP (constant)">Doing::Color::COLORED_REGEXP</a></span></p>
|
125
|
+
|
126
|
+
|
127
|
+
|
128
|
+
|
129
|
+
|
130
|
+
|
131
|
+
<h2>
|
132
|
+
Instance Method Summary
|
133
|
+
<small><a href="#" class="summary_toggle">collapse</a></small>
|
134
|
+
</h2>
|
135
|
+
|
136
|
+
<ul class="summary">
|
137
|
+
|
138
|
+
<li class="public ">
|
139
|
+
<span class="summary_signature">
|
140
|
+
|
141
|
+
<a href="#add_tags-instance_method" title="#add_tags (instance method)">#<strong>add_tags</strong>(tags, remove: false) ⇒ Object </a>
|
142
|
+
|
143
|
+
|
144
|
+
|
145
|
+
</span>
|
146
|
+
|
147
|
+
|
148
|
+
|
149
|
+
|
150
|
+
|
151
|
+
|
152
|
+
|
153
|
+
|
154
|
+
|
155
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
156
|
+
|
157
|
+
</li>
|
158
|
+
|
159
|
+
|
160
|
+
<li class="public ">
|
161
|
+
<span class="summary_signature">
|
162
|
+
|
163
|
+
<a href="#add_tags!-instance_method" title="#add_tags! (instance method)">#<strong>add_tags!</strong>(tags, remove: false) ⇒ Object </a>
|
164
|
+
|
165
|
+
|
166
|
+
|
167
|
+
</span>
|
168
|
+
|
169
|
+
|
170
|
+
|
171
|
+
|
172
|
+
|
173
|
+
|
174
|
+
|
175
|
+
|
176
|
+
|
177
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
178
|
+
|
179
|
+
</li>
|
180
|
+
|
181
|
+
|
182
|
+
<li class="public ">
|
183
|
+
<span class="summary_signature">
|
184
|
+
|
185
|
+
<a href="#cap_first-instance_method" title="#cap_first (instance method)">#<strong>cap_first</strong> ⇒ Object </a>
|
186
|
+
|
187
|
+
|
188
|
+
|
189
|
+
</span>
|
190
|
+
|
191
|
+
|
192
|
+
|
193
|
+
|
194
|
+
|
195
|
+
|
196
|
+
|
197
|
+
|
198
|
+
|
199
|
+
<span class="summary_desc"><div class='inline'><p>Capitalize on the first character on string.</p>
|
200
|
+
</div></span>
|
201
|
+
|
202
|
+
</li>
|
203
|
+
|
204
|
+
|
205
|
+
<li class="public ">
|
206
|
+
<span class="summary_signature">
|
207
|
+
|
208
|
+
<a href="#dedup_tags-instance_method" title="#dedup_tags (instance method)">#<strong>dedup_tags</strong> ⇒ Object </a>
|
209
|
+
|
210
|
+
|
211
|
+
|
212
|
+
</span>
|
213
|
+
|
214
|
+
|
215
|
+
|
216
|
+
|
217
|
+
|
218
|
+
|
219
|
+
|
220
|
+
|
221
|
+
|
222
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
223
|
+
|
224
|
+
</li>
|
225
|
+
|
226
|
+
|
227
|
+
<li class="public ">
|
228
|
+
<span class="summary_signature">
|
229
|
+
|
230
|
+
<a href="#dedup_tags!-instance_method" title="#dedup_tags! (instance method)">#<strong>dedup_tags!</strong> ⇒ Object </a>
|
231
|
+
|
232
|
+
|
233
|
+
|
234
|
+
</span>
|
235
|
+
|
236
|
+
|
237
|
+
|
238
|
+
|
239
|
+
|
240
|
+
|
241
|
+
|
242
|
+
|
243
|
+
|
244
|
+
<span class="summary_desc"><div class='inline'><p>Remove duplicate tags, leaving only first occurrence.</p>
|
245
|
+
</div></span>
|
246
|
+
|
247
|
+
</li>
|
248
|
+
|
249
|
+
|
250
|
+
<li class="public ">
|
251
|
+
<span class="summary_signature">
|
252
|
+
|
253
|
+
<a href="#highlight_tags-instance_method" title="#highlight_tags (instance method)">#<strong>highlight_tags</strong>(color = 'yellow') ⇒ String </a>
|
254
|
+
|
255
|
+
|
256
|
+
|
257
|
+
</span>
|
258
|
+
|
259
|
+
|
260
|
+
|
261
|
+
|
262
|
+
|
263
|
+
|
264
|
+
|
265
|
+
|
266
|
+
|
267
|
+
<span class="summary_desc"><div class='inline'><p>Colorize @tags with ANSI escapes.</p>
|
268
|
+
</div></span>
|
269
|
+
|
270
|
+
</li>
|
271
|
+
|
272
|
+
|
273
|
+
<li class="public ">
|
274
|
+
<span class="summary_signature">
|
275
|
+
|
276
|
+
<a href="#highlight_tags!-instance_method" title="#highlight_tags! (instance method)">#<strong>highlight_tags!</strong>(color = 'yellow') ⇒ Object </a>
|
277
|
+
|
278
|
+
|
279
|
+
|
280
|
+
</span>
|
281
|
+
|
282
|
+
|
283
|
+
|
284
|
+
|
285
|
+
|
286
|
+
|
287
|
+
|
288
|
+
|
289
|
+
|
290
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
291
|
+
|
292
|
+
</li>
|
293
|
+
|
294
|
+
|
295
|
+
<li class="public ">
|
296
|
+
<span class="summary_signature">
|
297
|
+
|
298
|
+
<a href="#ignore%3F-instance_method" title="#ignore? (instance method)">#<strong>ignore?</strong> ⇒ Boolean </a>
|
299
|
+
|
300
|
+
|
301
|
+
|
302
|
+
</span>
|
303
|
+
|
304
|
+
|
305
|
+
|
306
|
+
|
307
|
+
|
308
|
+
|
309
|
+
|
310
|
+
|
311
|
+
|
312
|
+
<span class="summary_desc"><div class='inline'><p>Test if line should be ignored.</p>
|
313
|
+
</div></span>
|
314
|
+
|
315
|
+
</li>
|
316
|
+
|
317
|
+
|
318
|
+
<li class="public ">
|
319
|
+
<span class="summary_signature">
|
320
|
+
|
321
|
+
<a href="#link_urls-instance_method" title="#link_urls (instance method)">#<strong>link_urls</strong>(opt = {}) ⇒ Object </a>
|
322
|
+
|
323
|
+
|
324
|
+
|
325
|
+
</span>
|
326
|
+
|
327
|
+
|
328
|
+
|
329
|
+
|
330
|
+
|
331
|
+
|
332
|
+
|
333
|
+
|
334
|
+
|
335
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
336
|
+
|
337
|
+
</li>
|
338
|
+
|
339
|
+
|
340
|
+
<li class="public ">
|
341
|
+
<span class="summary_signature">
|
342
|
+
|
343
|
+
<a href="#link_urls!-instance_method" title="#link_urls! (instance method)">#<strong>link_urls!</strong>(opt = {}) ⇒ Object </a>
|
344
|
+
|
345
|
+
|
346
|
+
|
347
|
+
</span>
|
348
|
+
|
349
|
+
|
350
|
+
|
351
|
+
|
352
|
+
|
353
|
+
|
354
|
+
|
355
|
+
|
356
|
+
|
357
|
+
<span class="summary_desc"><div class='inline'><p>Turn raw urls into HTML links.</p>
|
358
|
+
</div></span>
|
359
|
+
|
360
|
+
</li>
|
361
|
+
|
362
|
+
|
363
|
+
<li class="public ">
|
364
|
+
<span class="summary_signature">
|
365
|
+
|
366
|
+
<a href="#normalize_bool-instance_method" title="#normalize_bool (instance method)">#<strong>normalize_bool</strong>(default = :and) ⇒ Object </a>
|
367
|
+
|
368
|
+
|
369
|
+
|
370
|
+
</span>
|
371
|
+
|
372
|
+
|
373
|
+
|
374
|
+
|
375
|
+
|
376
|
+
|
377
|
+
|
378
|
+
|
379
|
+
|
380
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
381
|
+
|
382
|
+
</li>
|
383
|
+
|
384
|
+
|
385
|
+
<li class="public ">
|
386
|
+
<span class="summary_signature">
|
387
|
+
|
388
|
+
<a href="#normalize_bool!-instance_method" title="#normalize_bool! (instance method)">#<strong>normalize_bool!</strong>(default = :and) ⇒ Object </a>
|
389
|
+
|
390
|
+
|
391
|
+
|
392
|
+
</span>
|
393
|
+
|
394
|
+
|
395
|
+
|
396
|
+
|
397
|
+
|
398
|
+
|
399
|
+
|
400
|
+
|
401
|
+
|
402
|
+
<span class="summary_desc"><div class='inline'><p>Convert a boolean string to a symbol.</p>
|
403
|
+
</div></span>
|
404
|
+
|
405
|
+
</li>
|
406
|
+
|
407
|
+
|
408
|
+
<li class="public ">
|
409
|
+
<span class="summary_signature">
|
410
|
+
|
411
|
+
<a href="#normalize_case-instance_method" title="#normalize_case (instance method)">#<strong>normalize_case</strong>(default = :smart) ⇒ Object </a>
|
412
|
+
|
413
|
+
|
414
|
+
|
415
|
+
</span>
|
416
|
+
|
417
|
+
|
418
|
+
|
419
|
+
|
420
|
+
|
421
|
+
|
422
|
+
|
423
|
+
|
424
|
+
|
425
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
426
|
+
|
427
|
+
</li>
|
428
|
+
|
429
|
+
|
430
|
+
<li class="public ">
|
431
|
+
<span class="summary_signature">
|
432
|
+
|
433
|
+
<a href="#normalize_case!-instance_method" title="#normalize_case! (instance method)">#<strong>normalize_case!</strong> ⇒ Object </a>
|
434
|
+
|
435
|
+
|
436
|
+
|
437
|
+
</span>
|
438
|
+
|
439
|
+
|
440
|
+
|
441
|
+
|
442
|
+
|
443
|
+
|
444
|
+
|
445
|
+
|
446
|
+
|
447
|
+
<span class="summary_desc"><div class='inline'><p>Convert a case sensitivity string to a symbol.</p>
|
448
|
+
</div></span>
|
449
|
+
|
450
|
+
</li>
|
451
|
+
|
452
|
+
|
453
|
+
<li class="public ">
|
454
|
+
<span class="summary_signature">
|
455
|
+
|
456
|
+
<a href="#normalize_order-instance_method" title="#normalize_order (instance method)">#<strong>normalize_order</strong>(default = 'asc') ⇒ Object </a>
|
457
|
+
|
458
|
+
|
459
|
+
|
460
|
+
</span>
|
461
|
+
|
462
|
+
|
463
|
+
|
464
|
+
|
465
|
+
|
466
|
+
|
467
|
+
|
468
|
+
|
469
|
+
|
470
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
471
|
+
|
472
|
+
</li>
|
473
|
+
|
474
|
+
|
475
|
+
<li class="public ">
|
476
|
+
<span class="summary_signature">
|
477
|
+
|
478
|
+
<a href="#normalize_order!-instance_method" title="#normalize_order! (instance method)">#<strong>normalize_order!</strong>(default = 'asc') ⇒ String </a>
|
479
|
+
|
480
|
+
|
481
|
+
|
482
|
+
</span>
|
483
|
+
|
484
|
+
|
485
|
+
|
486
|
+
|
487
|
+
|
488
|
+
|
489
|
+
|
490
|
+
|
491
|
+
|
492
|
+
<span class="summary_desc"><div class='inline'><p>Convert a sort order string to a qualified type.</p>
|
493
|
+
</div></span>
|
494
|
+
|
495
|
+
</li>
|
496
|
+
|
497
|
+
|
498
|
+
<li class="public ">
|
499
|
+
<span class="summary_signature">
|
500
|
+
|
501
|
+
<a href="#normalize_trigger-instance_method" title="#normalize_trigger (instance method)">#<strong>normalize_trigger</strong> ⇒ Object </a>
|
502
|
+
|
503
|
+
|
504
|
+
|
505
|
+
</span>
|
506
|
+
|
507
|
+
|
508
|
+
|
509
|
+
|
510
|
+
|
511
|
+
|
512
|
+
|
513
|
+
|
514
|
+
|
515
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
516
|
+
|
517
|
+
</li>
|
518
|
+
|
519
|
+
|
520
|
+
<li class="public ">
|
521
|
+
<span class="summary_signature">
|
522
|
+
|
523
|
+
<a href="#normalize_trigger!-instance_method" title="#normalize_trigger! (instance method)">#<strong>normalize_trigger!</strong> ⇒ Object </a>
|
524
|
+
|
525
|
+
|
526
|
+
|
527
|
+
</span>
|
528
|
+
|
529
|
+
|
530
|
+
|
531
|
+
|
532
|
+
|
533
|
+
|
534
|
+
|
535
|
+
|
536
|
+
|
537
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
538
|
+
|
539
|
+
</li>
|
540
|
+
|
541
|
+
|
542
|
+
<li class="public ">
|
543
|
+
<span class="summary_signature">
|
544
|
+
|
545
|
+
<a href="#tag-instance_method" title="#tag (instance method)">#<strong>tag</strong>(tag, value: nil, remove: false, rename_to: nil, regex: false, single: false) ⇒ Object </a>
|
546
|
+
|
547
|
+
|
548
|
+
|
549
|
+
</span>
|
550
|
+
|
551
|
+
|
552
|
+
|
553
|
+
|
554
|
+
|
555
|
+
|
556
|
+
|
557
|
+
|
558
|
+
|
559
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
560
|
+
|
561
|
+
</li>
|
562
|
+
|
563
|
+
|
564
|
+
<li class="public ">
|
565
|
+
<span class="summary_signature">
|
566
|
+
|
567
|
+
<a href="#tag!-instance_method" title="#tag! (instance method)">#<strong>tag!</strong>(tag, value: nil, remove: false, rename_to: nil, regex: false, single: false) ⇒ Object </a>
|
568
|
+
|
569
|
+
|
570
|
+
|
571
|
+
</span>
|
572
|
+
|
573
|
+
|
574
|
+
|
575
|
+
|
576
|
+
|
577
|
+
|
578
|
+
|
579
|
+
|
580
|
+
|
581
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
582
|
+
|
583
|
+
</li>
|
584
|
+
|
585
|
+
|
586
|
+
<li class="public ">
|
587
|
+
<span class="summary_signature">
|
588
|
+
|
589
|
+
<a href="#to_rx-instance_method" title="#to_rx (instance method)">#<strong>to_rx</strong>(distance) ⇒ String </a>
|
590
|
+
|
591
|
+
|
592
|
+
|
593
|
+
</span>
|
594
|
+
|
595
|
+
|
596
|
+
|
597
|
+
|
598
|
+
|
599
|
+
|
600
|
+
|
601
|
+
|
602
|
+
|
603
|
+
<span class="summary_desc"><div class='inline'><p>Convert string to fuzzy regex.</p>
|
604
|
+
</div></span>
|
605
|
+
|
606
|
+
</li>
|
607
|
+
|
608
|
+
|
609
|
+
<li class="public ">
|
610
|
+
<span class="summary_signature">
|
611
|
+
|
612
|
+
<a href="#to_tags-instance_method" title="#to_tags (instance method)">#<strong>to_tags</strong> ⇒ Object </a>
|
613
|
+
|
614
|
+
|
615
|
+
|
616
|
+
</span>
|
617
|
+
|
618
|
+
|
619
|
+
|
620
|
+
|
621
|
+
|
622
|
+
|
623
|
+
|
624
|
+
|
625
|
+
|
626
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
627
|
+
|
628
|
+
</li>
|
629
|
+
|
630
|
+
|
631
|
+
<li class="public ">
|
632
|
+
<span class="summary_signature">
|
633
|
+
|
634
|
+
<a href="#truncate-instance_method" title="#truncate (instance method)">#<strong>truncate</strong>(len, ellipsis: '...') ⇒ Object </a>
|
635
|
+
|
636
|
+
|
637
|
+
|
638
|
+
</span>
|
639
|
+
|
640
|
+
|
641
|
+
|
642
|
+
|
643
|
+
|
644
|
+
|
645
|
+
|
646
|
+
|
647
|
+
|
648
|
+
<span class="summary_desc"><div class='inline'><p>Truncate to nearest word.</p>
|
649
|
+
</div></span>
|
650
|
+
|
651
|
+
</li>
|
652
|
+
|
653
|
+
|
654
|
+
<li class="public ">
|
655
|
+
<span class="summary_signature">
|
656
|
+
|
657
|
+
<a href="#truncate!-instance_method" title="#truncate! (instance method)">#<strong>truncate!</strong>(len, ellipsis: '...') ⇒ Object </a>
|
658
|
+
|
659
|
+
|
660
|
+
|
661
|
+
</span>
|
662
|
+
|
663
|
+
|
664
|
+
|
665
|
+
|
666
|
+
|
667
|
+
|
668
|
+
|
669
|
+
|
670
|
+
|
671
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
672
|
+
|
673
|
+
</li>
|
674
|
+
|
675
|
+
|
676
|
+
<li class="public ">
|
677
|
+
<span class="summary_signature">
|
678
|
+
|
679
|
+
<a href="#truncmiddle-instance_method" title="#truncmiddle (instance method)">#<strong>truncmiddle</strong>(len, ellipsis: '...') ⇒ Object </a>
|
680
|
+
|
681
|
+
|
682
|
+
|
683
|
+
</span>
|
684
|
+
|
685
|
+
|
686
|
+
|
687
|
+
|
688
|
+
|
689
|
+
|
690
|
+
|
691
|
+
|
692
|
+
|
693
|
+
<span class="summary_desc"><div class='inline'><p>Truncate string in the middle.</p>
|
694
|
+
</div></span>
|
695
|
+
|
696
|
+
</li>
|
697
|
+
|
698
|
+
|
699
|
+
<li class="public ">
|
700
|
+
<span class="summary_signature">
|
701
|
+
|
702
|
+
<a href="#truncmiddle!-instance_method" title="#truncmiddle! (instance method)">#<strong>truncmiddle!</strong>(len, ellipsis: '...') ⇒ Object </a>
|
703
|
+
|
704
|
+
|
705
|
+
|
706
|
+
</span>
|
707
|
+
|
708
|
+
|
709
|
+
|
710
|
+
|
711
|
+
|
712
|
+
|
713
|
+
|
714
|
+
|
715
|
+
|
716
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
717
|
+
|
718
|
+
</li>
|
719
|
+
|
720
|
+
|
721
|
+
<li class="public ">
|
722
|
+
<span class="summary_signature">
|
723
|
+
|
724
|
+
<a href="#truthy%3F-instance_method" title="#truthy? (instance method)">#<strong>truthy?</strong> ⇒ Boolean </a>
|
725
|
+
|
726
|
+
|
727
|
+
|
728
|
+
</span>
|
729
|
+
|
730
|
+
|
731
|
+
|
732
|
+
|
733
|
+
|
734
|
+
|
735
|
+
|
736
|
+
|
737
|
+
|
738
|
+
<span class="summary_desc"><div class='inline'><p>Test string for truthiness (0, "f", "false", "n", "no" all return false, case insensitive, otherwise true).</p>
|
739
|
+
</div></span>
|
740
|
+
|
741
|
+
</li>
|
742
|
+
|
743
|
+
|
744
|
+
<li class="public ">
|
745
|
+
<span class="summary_signature">
|
746
|
+
|
747
|
+
<a href="#uncolor-instance_method" title="#uncolor (instance method)">#<strong>uncolor</strong> ⇒ Object </a>
|
748
|
+
|
749
|
+
|
750
|
+
|
751
|
+
</span>
|
752
|
+
|
753
|
+
|
754
|
+
|
755
|
+
|
756
|
+
|
757
|
+
|
758
|
+
|
759
|
+
|
760
|
+
|
761
|
+
<span class="summary_desc"><div class='inline'><p>Remove color escape codes.</p>
|
762
|
+
</div></span>
|
763
|
+
|
764
|
+
</li>
|
765
|
+
|
766
|
+
|
767
|
+
<li class="public ">
|
768
|
+
<span class="summary_signature">
|
769
|
+
|
770
|
+
<a href="#uncolor!-instance_method" title="#uncolor! (instance method)">#<strong>uncolor!</strong> ⇒ Object </a>
|
771
|
+
|
772
|
+
|
773
|
+
|
774
|
+
</span>
|
775
|
+
|
776
|
+
|
777
|
+
|
778
|
+
|
779
|
+
|
780
|
+
|
781
|
+
|
782
|
+
|
783
|
+
|
784
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
785
|
+
|
786
|
+
</li>
|
787
|
+
|
788
|
+
|
789
|
+
<li class="public ">
|
790
|
+
<span class="summary_signature">
|
791
|
+
|
792
|
+
<a href="#wrap-instance_method" title="#wrap (instance method)">#<strong>wrap</strong>(len, pad: 0, indent: ' ', offset: 0, prefix: '', after: '', reset: '') ⇒ Object </a>
|
793
|
+
|
794
|
+
|
795
|
+
|
796
|
+
</span>
|
797
|
+
|
798
|
+
|
799
|
+
|
800
|
+
|
801
|
+
|
802
|
+
|
803
|
+
|
804
|
+
|
805
|
+
|
806
|
+
<span class="summary_desc"><div class='inline'><p>Wrap string at word breaks, respecting tags.</p>
|
807
|
+
</div></span>
|
808
|
+
|
809
|
+
</li>
|
810
|
+
|
811
|
+
|
812
|
+
</ul>
|
813
|
+
|
814
|
+
|
815
|
+
|
816
|
+
|
817
|
+
|
818
|
+
|
819
|
+
|
820
|
+
|
821
|
+
|
822
|
+
|
823
|
+
|
824
|
+
<h3 class="inherited">Methods included from <span class='object_link'><a href="Doing/Color.html" title="Doing::Color (module)">Doing::Color</a></span></h3>
|
825
|
+
<p class="inherited"><span class='object_link'><a href="Doing/Color.html#attributes-class_method" title="Doing::Color.attributes (method)">attributes</a></span>, <span class='object_link'><a href="Doing/Color.html#coloring=-class_method" title="Doing::Color.coloring= (method)">coloring=</a></span>, <span class='object_link'><a href="Doing/Color.html#coloring%3F-class_method" title="Doing::Color.coloring? (method)">coloring?</a></span>, <span class='object_link'><a href="Doing/Color.html#support%3F-instance_method" title="Doing::Color#support? (method)">#support?</a></span></p>
|
826
|
+
|
827
|
+
|
828
|
+
<div id="instance_method_details" class="method_details_list">
|
829
|
+
<h2>Instance Method Details</h2>
|
830
|
+
|
831
|
+
|
832
|
+
<div class="method_details first">
|
833
|
+
<h3 class="signature first" id="add_tags-instance_method">
|
834
|
+
|
835
|
+
#<strong>add_tags</strong>(tags, remove: false) ⇒ <tt>Object</tt>
|
836
|
+
|
837
|
+
|
838
|
+
|
839
|
+
|
840
|
+
|
841
|
+
</h3>
|
842
|
+
</div>
|
843
|
+
|
844
|
+
<div class="method_details ">
|
845
|
+
<h3 class="signature " id="add_tags!-instance_method">
|
846
|
+
|
847
|
+
#<strong>add_tags!</strong>(tags, remove: false) ⇒ <tt>Object</tt>
|
848
|
+
|
849
|
+
|
850
|
+
|
851
|
+
|
852
|
+
|
853
|
+
</h3>
|
854
|
+
</div>
|
855
|
+
|
856
|
+
<div class="method_details ">
|
857
|
+
<h3 class="signature " id="cap_first-instance_method">
|
858
|
+
|
859
|
+
#<strong>cap_first</strong> ⇒ <tt>Object</tt>
|
860
|
+
|
861
|
+
|
862
|
+
|
863
|
+
|
864
|
+
|
865
|
+
</h3><div class="docstring">
|
866
|
+
<div class="discussion">
|
867
|
+
<p>Capitalize on the first character on string</p>
|
868
|
+
|
869
|
+
|
870
|
+
</div>
|
871
|
+
</div>
|
872
|
+
<div class="tags">
|
873
|
+
|
874
|
+
<p class="tag_title">Returns:</p>
|
875
|
+
<ul class="return">
|
876
|
+
|
877
|
+
<li>
|
878
|
+
|
879
|
+
|
880
|
+
<span class='type'></span>
|
881
|
+
|
882
|
+
|
883
|
+
|
884
|
+
|
885
|
+
<div class='inline'><p>Capitalized string</p>
|
886
|
+
</div>
|
887
|
+
|
888
|
+
</li>
|
889
|
+
|
890
|
+
</ul>
|
891
|
+
|
892
|
+
</div>
|
893
|
+
</div>
|
894
|
+
|
895
|
+
<div class="method_details ">
|
896
|
+
<h3 class="signature " id="dedup_tags-instance_method">
|
897
|
+
|
898
|
+
#<strong>dedup_tags</strong> ⇒ <tt>Object</tt>
|
899
|
+
|
900
|
+
|
901
|
+
|
902
|
+
|
903
|
+
|
904
|
+
</h3>
|
905
|
+
</div>
|
906
|
+
|
907
|
+
<div class="method_details ">
|
908
|
+
<h3 class="signature " id="dedup_tags!-instance_method">
|
909
|
+
|
910
|
+
#<strong>dedup_tags!</strong> ⇒ <tt>Object</tt>
|
911
|
+
|
912
|
+
|
913
|
+
|
914
|
+
|
915
|
+
|
916
|
+
</h3><div class="docstring">
|
917
|
+
<div class="discussion">
|
918
|
+
<p>Remove duplicate tags, leaving only first occurrence</p>
|
919
|
+
|
920
|
+
|
921
|
+
</div>
|
922
|
+
</div>
|
923
|
+
<div class="tags">
|
924
|
+
|
925
|
+
<p class="tag_title">Returns:</p>
|
926
|
+
<ul class="return">
|
927
|
+
|
928
|
+
<li>
|
929
|
+
|
930
|
+
|
931
|
+
<span class='type'></span>
|
932
|
+
|
933
|
+
|
934
|
+
|
935
|
+
|
936
|
+
<div class='inline'><p>Deduplicated string</p>
|
937
|
+
</div>
|
938
|
+
|
939
|
+
</li>
|
940
|
+
|
941
|
+
</ul>
|
942
|
+
|
943
|
+
</div>
|
944
|
+
</div>
|
945
|
+
|
946
|
+
<div class="method_details ">
|
947
|
+
<h3 class="signature " id="highlight_tags-instance_method">
|
948
|
+
|
949
|
+
#<strong>highlight_tags</strong>(color = 'yellow') ⇒ <tt><span class='object_link'><a href="" title="String (class)">String</a></span></tt>
|
950
|
+
|
951
|
+
|
952
|
+
|
953
|
+
|
954
|
+
|
955
|
+
</h3><div class="docstring">
|
956
|
+
<div class="discussion">
|
957
|
+
<p>Colorize @tags with ANSI escapes</p>
|
958
|
+
|
959
|
+
|
960
|
+
</div>
|
961
|
+
</div>
|
962
|
+
<div class="tags">
|
963
|
+
<p class="tag_title">Parameters:</p>
|
964
|
+
<ul class="param">
|
965
|
+
|
966
|
+
<li>
|
967
|
+
|
968
|
+
<span class='name'>color</span>
|
969
|
+
|
970
|
+
|
971
|
+
<span class='type'>(<tt><span class='object_link'><a href="" title="String (class)">String</a></span></tt>)</span>
|
972
|
+
|
973
|
+
|
974
|
+
<em class="default">(defaults to: <tt>'yellow'</tt>)</em>
|
975
|
+
|
976
|
+
|
977
|
+
—
|
978
|
+
<div class='inline'><p>color (see #Color)</p>
|
979
|
+
</div>
|
980
|
+
|
981
|
+
</li>
|
982
|
+
|
983
|
+
</ul>
|
984
|
+
|
985
|
+
<p class="tag_title">Returns:</p>
|
986
|
+
<ul class="return">
|
987
|
+
|
988
|
+
<li>
|
989
|
+
|
990
|
+
|
991
|
+
<span class='type'>(<tt><span class='object_link'><a href="" title="String (class)">String</a></span></tt>)</span>
|
992
|
+
|
993
|
+
|
994
|
+
|
995
|
+
—
|
996
|
+
<div class='inline'><p>string with @tags highlighted</p>
|
997
|
+
</div>
|
998
|
+
|
999
|
+
</li>
|
1000
|
+
|
1001
|
+
</ul>
|
1002
|
+
|
1003
|
+
</div>
|
1004
|
+
</div>
|
1005
|
+
|
1006
|
+
<div class="method_details ">
|
1007
|
+
<h3 class="signature " id="highlight_tags!-instance_method">
|
1008
|
+
|
1009
|
+
#<strong>highlight_tags!</strong>(color = 'yellow') ⇒ <tt>Object</tt>
|
1010
|
+
|
1011
|
+
|
1012
|
+
|
1013
|
+
|
1014
|
+
|
1015
|
+
</h3><div class="docstring">
|
1016
|
+
<div class="discussion">
|
1017
|
+
|
1018
|
+
|
1019
|
+
</div>
|
1020
|
+
</div>
|
1021
|
+
<div class="tags">
|
1022
|
+
<p class="tag_title">Parameters:</p>
|
1023
|
+
<ul class="param">
|
1024
|
+
|
1025
|
+
<li>
|
1026
|
+
|
1027
|
+
<span class='name'>color</span>
|
1028
|
+
|
1029
|
+
|
1030
|
+
<span class='type'>(<tt><span class='object_link'><a href="" title="String (class)">String</a></span></tt>)</span>
|
1031
|
+
|
1032
|
+
|
1033
|
+
<em class="default">(defaults to: <tt>'yellow'</tt>)</em>
|
1034
|
+
|
1035
|
+
|
1036
|
+
—
|
1037
|
+
<div class='inline'><p>color (see #Color)</p>
|
1038
|
+
</div>
|
1039
|
+
|
1040
|
+
</li>
|
1041
|
+
|
1042
|
+
</ul>
|
1043
|
+
|
1044
|
+
|
1045
|
+
</div>
|
1046
|
+
</div>
|
1047
|
+
|
1048
|
+
<div class="method_details ">
|
1049
|
+
<h3 class="signature " id="ignore?-instance_method">
|
1050
|
+
|
1051
|
+
#<strong>ignore?</strong> ⇒ <tt>Boolean</tt>
|
1052
|
+
|
1053
|
+
|
1054
|
+
|
1055
|
+
|
1056
|
+
|
1057
|
+
</h3><div class="docstring">
|
1058
|
+
<div class="discussion">
|
1059
|
+
<p>Test if line should be ignored</p>
|
1060
|
+
|
1061
|
+
|
1062
|
+
</div>
|
1063
|
+
</div>
|
1064
|
+
<div class="tags">
|
1065
|
+
|
1066
|
+
<p class="tag_title">Returns:</p>
|
1067
|
+
<ul class="return">
|
1068
|
+
|
1069
|
+
<li>
|
1070
|
+
|
1071
|
+
|
1072
|
+
<span class='type'>(<tt>Boolean</tt>)</span>
|
1073
|
+
|
1074
|
+
|
1075
|
+
|
1076
|
+
—
|
1077
|
+
<div class='inline'><p>line is empty or comment</p>
|
1078
|
+
</div>
|
1079
|
+
|
1080
|
+
</li>
|
1081
|
+
|
1082
|
+
</ul>
|
1083
|
+
|
1084
|
+
</div>
|
1085
|
+
</div>
|
1086
|
+
|
1087
|
+
<div class="method_details ">
|
1088
|
+
<h3 class="signature " id="link_urls-instance_method">
|
1089
|
+
|
1090
|
+
#<strong>link_urls</strong>(opt = {}) ⇒ <tt>Object</tt>
|
1091
|
+
|
1092
|
+
|
1093
|
+
|
1094
|
+
|
1095
|
+
|
1096
|
+
</h3>
|
1097
|
+
</div>
|
1098
|
+
|
1099
|
+
<div class="method_details ">
|
1100
|
+
<h3 class="signature " id="link_urls!-instance_method">
|
1101
|
+
|
1102
|
+
#<strong>link_urls!</strong>(opt = {}) ⇒ <tt>Object</tt>
|
1103
|
+
|
1104
|
+
|
1105
|
+
|
1106
|
+
|
1107
|
+
|
1108
|
+
</h3><div class="docstring">
|
1109
|
+
<div class="discussion">
|
1110
|
+
<p>Turn raw urls into HTML links</p>
|
1111
|
+
|
1112
|
+
|
1113
|
+
</div>
|
1114
|
+
</div>
|
1115
|
+
<div class="tags">
|
1116
|
+
<p class="tag_title">Parameters:</p>
|
1117
|
+
<ul class="param">
|
1118
|
+
|
1119
|
+
<li>
|
1120
|
+
|
1121
|
+
<span class='name'>opt</span>
|
1122
|
+
|
1123
|
+
|
1124
|
+
<span class='type'>(<tt><span class='object_link'><a href="Hash.html" title="Hash (class)">Hash</a></span></tt>)</span>
|
1125
|
+
|
1126
|
+
|
1127
|
+
<em class="default">(defaults to: <tt>{}</tt>)</em>
|
1128
|
+
|
1129
|
+
|
1130
|
+
—
|
1131
|
+
<div class='inline'><p>Additional Options</p>
|
1132
|
+
</div>
|
1133
|
+
|
1134
|
+
</li>
|
1135
|
+
|
1136
|
+
</ul>
|
1137
|
+
|
1138
|
+
|
1139
|
+
</div>
|
1140
|
+
</div>
|
1141
|
+
|
1142
|
+
<div class="method_details ">
|
1143
|
+
<h3 class="signature " id="normalize_bool-instance_method">
|
1144
|
+
|
1145
|
+
#<strong>normalize_bool</strong>(default = :and) ⇒ <tt>Object</tt>
|
1146
|
+
|
1147
|
+
|
1148
|
+
|
1149
|
+
|
1150
|
+
|
1151
|
+
</h3>
|
1152
|
+
</div>
|
1153
|
+
|
1154
|
+
<div class="method_details ">
|
1155
|
+
<h3 class="signature " id="normalize_bool!-instance_method">
|
1156
|
+
|
1157
|
+
#<strong>normalize_bool!</strong>(default = :and) ⇒ <tt>Object</tt>
|
1158
|
+
|
1159
|
+
|
1160
|
+
|
1161
|
+
|
1162
|
+
|
1163
|
+
</h3><div class="docstring">
|
1164
|
+
<div class="discussion">
|
1165
|
+
<p>Convert a boolean string to a symbol</p>
|
1166
|
+
|
1167
|
+
|
1168
|
+
</div>
|
1169
|
+
</div>
|
1170
|
+
<div class="tags">
|
1171
|
+
|
1172
|
+
<p class="tag_title">Returns:</p>
|
1173
|
+
<ul class="return">
|
1174
|
+
|
1175
|
+
<li>
|
1176
|
+
|
1177
|
+
|
1178
|
+
<span class='type'></span>
|
1179
|
+
|
1180
|
+
|
1181
|
+
|
1182
|
+
|
1183
|
+
<div class='inline'><p>Symbol :and, :or, or :not</p>
|
1184
|
+
</div>
|
1185
|
+
|
1186
|
+
</li>
|
1187
|
+
|
1188
|
+
</ul>
|
1189
|
+
|
1190
|
+
</div>
|
1191
|
+
</div>
|
1192
|
+
|
1193
|
+
<div class="method_details ">
|
1194
|
+
<h3 class="signature " id="normalize_case-instance_method">
|
1195
|
+
|
1196
|
+
#<strong>normalize_case</strong>(default = :smart) ⇒ <tt>Object</tt>
|
1197
|
+
|
1198
|
+
|
1199
|
+
|
1200
|
+
|
1201
|
+
|
1202
|
+
</h3>
|
1203
|
+
</div>
|
1204
|
+
|
1205
|
+
<div class="method_details ">
|
1206
|
+
<h3 class="signature " id="normalize_case!-instance_method">
|
1207
|
+
|
1208
|
+
#<strong>normalize_case!</strong> ⇒ <tt>Object</tt>
|
1209
|
+
|
1210
|
+
|
1211
|
+
|
1212
|
+
|
1213
|
+
|
1214
|
+
</h3><div class="docstring">
|
1215
|
+
<div class="discussion">
|
1216
|
+
<p>Convert a case sensitivity string to a symbol</p>
|
1217
|
+
|
1218
|
+
|
1219
|
+
</div>
|
1220
|
+
</div>
|
1221
|
+
<div class="tags">
|
1222
|
+
|
1223
|
+
<p class="tag_title">Returns:</p>
|
1224
|
+
<ul class="return">
|
1225
|
+
|
1226
|
+
<li>
|
1227
|
+
|
1228
|
+
|
1229
|
+
<span class='type'></span>
|
1230
|
+
|
1231
|
+
|
1232
|
+
|
1233
|
+
|
1234
|
+
<div class='inline'><p>Symbol :smart, :sensitive, :insensitive</p>
|
1235
|
+
</div>
|
1236
|
+
|
1237
|
+
</li>
|
1238
|
+
|
1239
|
+
</ul>
|
1240
|
+
|
1241
|
+
</div>
|
1242
|
+
</div>
|
1243
|
+
|
1244
|
+
<div class="method_details ">
|
1245
|
+
<h3 class="signature " id="normalize_order-instance_method">
|
1246
|
+
|
1247
|
+
#<strong>normalize_order</strong>(default = 'asc') ⇒ <tt>Object</tt>
|
1248
|
+
|
1249
|
+
|
1250
|
+
|
1251
|
+
|
1252
|
+
|
1253
|
+
</h3>
|
1254
|
+
</div>
|
1255
|
+
|
1256
|
+
<div class="method_details ">
|
1257
|
+
<h3 class="signature " id="normalize_order!-instance_method">
|
1258
|
+
|
1259
|
+
#<strong>normalize_order!</strong>(default = 'asc') ⇒ <tt><span class='object_link'><a href="" title="String (class)">String</a></span></tt>
|
1260
|
+
|
1261
|
+
|
1262
|
+
|
1263
|
+
|
1264
|
+
|
1265
|
+
</h3><div class="docstring">
|
1266
|
+
<div class="discussion">
|
1267
|
+
<p>Convert a sort order string to a qualified type</p>
|
1268
|
+
|
1269
|
+
|
1270
|
+
</div>
|
1271
|
+
</div>
|
1272
|
+
<div class="tags">
|
1273
|
+
|
1274
|
+
<p class="tag_title">Returns:</p>
|
1275
|
+
<ul class="return">
|
1276
|
+
|
1277
|
+
<li>
|
1278
|
+
|
1279
|
+
|
1280
|
+
<span class='type'>(<tt><span class='object_link'><a href="" title="String (class)">String</a></span></tt>)</span>
|
1281
|
+
|
1282
|
+
|
1283
|
+
|
1284
|
+
—
|
1285
|
+
<div class='inline'><p>'asc' or 'desc'</p>
|
1286
|
+
</div>
|
1287
|
+
|
1288
|
+
</li>
|
1289
|
+
|
1290
|
+
</ul>
|
1291
|
+
|
1292
|
+
</div>
|
1293
|
+
</div>
|
1294
|
+
|
1295
|
+
<div class="method_details ">
|
1296
|
+
<h3 class="signature " id="normalize_trigger-instance_method">
|
1297
|
+
|
1298
|
+
#<strong>normalize_trigger</strong> ⇒ <tt>Object</tt>
|
1299
|
+
|
1300
|
+
|
1301
|
+
|
1302
|
+
|
1303
|
+
|
1304
|
+
</h3>
|
1305
|
+
</div>
|
1306
|
+
|
1307
|
+
<div class="method_details ">
|
1308
|
+
<h3 class="signature " id="normalize_trigger!-instance_method">
|
1309
|
+
|
1310
|
+
#<strong>normalize_trigger!</strong> ⇒ <tt>Object</tt>
|
1311
|
+
|
1312
|
+
|
1313
|
+
|
1314
|
+
|
1315
|
+
|
1316
|
+
</h3>
|
1317
|
+
</div>
|
1318
|
+
|
1319
|
+
<div class="method_details ">
|
1320
|
+
<h3 class="signature " id="tag-instance_method">
|
1321
|
+
|
1322
|
+
#<strong>tag</strong>(tag, value: nil, remove: false, rename_to: nil, regex: false, single: false) ⇒ <tt>Object</tt>
|
1323
|
+
|
1324
|
+
|
1325
|
+
|
1326
|
+
|
1327
|
+
|
1328
|
+
</h3>
|
1329
|
+
</div>
|
1330
|
+
|
1331
|
+
<div class="method_details ">
|
1332
|
+
<h3 class="signature " id="tag!-instance_method">
|
1333
|
+
|
1334
|
+
#<strong>tag!</strong>(tag, value: nil, remove: false, rename_to: nil, regex: false, single: false) ⇒ <tt>Object</tt>
|
1335
|
+
|
1336
|
+
|
1337
|
+
|
1338
|
+
|
1339
|
+
|
1340
|
+
</h3>
|
1341
|
+
</div>
|
1342
|
+
|
1343
|
+
<div class="method_details ">
|
1344
|
+
<h3 class="signature " id="to_rx-instance_method">
|
1345
|
+
|
1346
|
+
#<strong>to_rx</strong>(distance) ⇒ <tt><span class='object_link'><a href="" title="String (class)">String</a></span></tt>
|
1347
|
+
|
1348
|
+
|
1349
|
+
|
1350
|
+
|
1351
|
+
|
1352
|
+
</h3><div class="docstring">
|
1353
|
+
<div class="discussion">
|
1354
|
+
<p>Convert string to fuzzy regex</p>
|
1355
|
+
|
1356
|
+
|
1357
|
+
</div>
|
1358
|
+
</div>
|
1359
|
+
<div class="tags">
|
1360
|
+
<p class="tag_title">Parameters:</p>
|
1361
|
+
<ul class="param">
|
1362
|
+
|
1363
|
+
<li>
|
1364
|
+
|
1365
|
+
<span class='name'>distance</span>
|
1366
|
+
|
1367
|
+
|
1368
|
+
<span class='type'>(<tt>Integer</tt>)</span>
|
1369
|
+
|
1370
|
+
|
1371
|
+
|
1372
|
+
—
|
1373
|
+
<div class='inline'><p>Allowed distance
|
1374
|
+
between characters</p>
|
1375
|
+
</div>
|
1376
|
+
|
1377
|
+
</li>
|
1378
|
+
|
1379
|
+
</ul>
|
1380
|
+
|
1381
|
+
<p class="tag_title">Returns:</p>
|
1382
|
+
<ul class="return">
|
1383
|
+
|
1384
|
+
<li>
|
1385
|
+
|
1386
|
+
|
1387
|
+
<span class='type'>(<tt><span class='object_link'><a href="" title="String (class)">String</a></span></tt>)</span>
|
1388
|
+
|
1389
|
+
|
1390
|
+
|
1391
|
+
—
|
1392
|
+
<div class='inline'><p>Regex pattern</p>
|
1393
|
+
</div>
|
1394
|
+
|
1395
|
+
</li>
|
1396
|
+
|
1397
|
+
</ul>
|
1398
|
+
|
1399
|
+
</div>
|
1400
|
+
</div>
|
1401
|
+
|
1402
|
+
<div class="method_details ">
|
1403
|
+
<h3 class="signature " id="to_tags-instance_method">
|
1404
|
+
|
1405
|
+
#<strong>to_tags</strong> ⇒ <tt>Object</tt>
|
1406
|
+
|
1407
|
+
|
1408
|
+
|
1409
|
+
|
1410
|
+
|
1411
|
+
</h3>
|
1412
|
+
</div>
|
1413
|
+
|
1414
|
+
<div class="method_details ">
|
1415
|
+
<h3 class="signature " id="truncate-instance_method">
|
1416
|
+
|
1417
|
+
#<strong>truncate</strong>(len, ellipsis: '...') ⇒ <tt>Object</tt>
|
1418
|
+
|
1419
|
+
|
1420
|
+
|
1421
|
+
|
1422
|
+
|
1423
|
+
</h3><div class="docstring">
|
1424
|
+
<div class="discussion">
|
1425
|
+
<p>Truncate to nearest word</p>
|
1426
|
+
|
1427
|
+
|
1428
|
+
</div>
|
1429
|
+
</div>
|
1430
|
+
<div class="tags">
|
1431
|
+
<p class="tag_title">Parameters:</p>
|
1432
|
+
<ul class="param">
|
1433
|
+
|
1434
|
+
<li>
|
1435
|
+
|
1436
|
+
<span class='name'>len</span>
|
1437
|
+
|
1438
|
+
|
1439
|
+
<span class='type'></span>
|
1440
|
+
|
1441
|
+
|
1442
|
+
|
1443
|
+
—
|
1444
|
+
<div class='inline'><p>The length</p>
|
1445
|
+
</div>
|
1446
|
+
|
1447
|
+
</li>
|
1448
|
+
|
1449
|
+
</ul>
|
1450
|
+
|
1451
|
+
|
1452
|
+
</div>
|
1453
|
+
</div>
|
1454
|
+
|
1455
|
+
<div class="method_details ">
|
1456
|
+
<h3 class="signature " id="truncate!-instance_method">
|
1457
|
+
|
1458
|
+
#<strong>truncate!</strong>(len, ellipsis: '...') ⇒ <tt>Object</tt>
|
1459
|
+
|
1460
|
+
|
1461
|
+
|
1462
|
+
|
1463
|
+
|
1464
|
+
</h3>
|
1465
|
+
</div>
|
1466
|
+
|
1467
|
+
<div class="method_details ">
|
1468
|
+
<h3 class="signature " id="truncmiddle-instance_method">
|
1469
|
+
|
1470
|
+
#<strong>truncmiddle</strong>(len, ellipsis: '...') ⇒ <tt>Object</tt>
|
1471
|
+
|
1472
|
+
|
1473
|
+
|
1474
|
+
|
1475
|
+
|
1476
|
+
</h3><div class="docstring">
|
1477
|
+
<div class="discussion">
|
1478
|
+
<p>Truncate string in the middle</p>
|
1479
|
+
|
1480
|
+
|
1481
|
+
</div>
|
1482
|
+
</div>
|
1483
|
+
<div class="tags">
|
1484
|
+
<p class="tag_title">Parameters:</p>
|
1485
|
+
<ul class="param">
|
1486
|
+
|
1487
|
+
<li>
|
1488
|
+
|
1489
|
+
<span class='name'>len</span>
|
1490
|
+
|
1491
|
+
|
1492
|
+
<span class='type'></span>
|
1493
|
+
|
1494
|
+
|
1495
|
+
|
1496
|
+
—
|
1497
|
+
<div class='inline'><p>The length</p>
|
1498
|
+
</div>
|
1499
|
+
|
1500
|
+
</li>
|
1501
|
+
|
1502
|
+
<li>
|
1503
|
+
|
1504
|
+
<span class='name'>ellipsis</span>
|
1505
|
+
|
1506
|
+
|
1507
|
+
<span class='type'></span>
|
1508
|
+
|
1509
|
+
|
1510
|
+
<em class="default">(defaults to: <tt>'...'</tt>)</em>
|
1511
|
+
|
1512
|
+
|
1513
|
+
—
|
1514
|
+
<div class='inline'><p>The ellipsis</p>
|
1515
|
+
</div>
|
1516
|
+
|
1517
|
+
</li>
|
1518
|
+
|
1519
|
+
</ul>
|
1520
|
+
|
1521
|
+
|
1522
|
+
</div>
|
1523
|
+
</div>
|
1524
|
+
|
1525
|
+
<div class="method_details ">
|
1526
|
+
<h3 class="signature " id="truncmiddle!-instance_method">
|
1527
|
+
|
1528
|
+
#<strong>truncmiddle!</strong>(len, ellipsis: '...') ⇒ <tt>Object</tt>
|
1529
|
+
|
1530
|
+
|
1531
|
+
|
1532
|
+
|
1533
|
+
|
1534
|
+
</h3>
|
1535
|
+
</div>
|
1536
|
+
|
1537
|
+
<div class="method_details ">
|
1538
|
+
<h3 class="signature " id="truthy?-instance_method">
|
1539
|
+
|
1540
|
+
#<strong>truthy?</strong> ⇒ <tt>Boolean</tt>
|
1541
|
+
|
1542
|
+
|
1543
|
+
|
1544
|
+
|
1545
|
+
|
1546
|
+
</h3><div class="docstring">
|
1547
|
+
<div class="discussion">
|
1548
|
+
<p>Test string for truthiness (0, "f", "false", "n", "no" all return false, case insensitive, otherwise true)</p>
|
1549
|
+
|
1550
|
+
|
1551
|
+
</div>
|
1552
|
+
</div>
|
1553
|
+
<div class="tags">
|
1554
|
+
|
1555
|
+
<p class="tag_title">Returns:</p>
|
1556
|
+
<ul class="return">
|
1557
|
+
|
1558
|
+
<li>
|
1559
|
+
|
1560
|
+
|
1561
|
+
<span class='type'>(<tt>Boolean</tt>)</span>
|
1562
|
+
|
1563
|
+
|
1564
|
+
|
1565
|
+
—
|
1566
|
+
<div class='inline'><p>String is truthy</p>
|
1567
|
+
</div>
|
1568
|
+
|
1569
|
+
</li>
|
1570
|
+
|
1571
|
+
</ul>
|
1572
|
+
|
1573
|
+
</div>
|
1574
|
+
</div>
|
1575
|
+
|
1576
|
+
<div class="method_details ">
|
1577
|
+
<h3 class="signature " id="uncolor-instance_method">
|
1578
|
+
|
1579
|
+
#<strong>uncolor</strong> ⇒ <tt>Object</tt>
|
1580
|
+
|
1581
|
+
|
1582
|
+
|
1583
|
+
|
1584
|
+
|
1585
|
+
</h3><div class="docstring">
|
1586
|
+
<div class="discussion">
|
1587
|
+
<p>Remove color escape codes</p>
|
1588
|
+
|
1589
|
+
|
1590
|
+
</div>
|
1591
|
+
</div>
|
1592
|
+
<div class="tags">
|
1593
|
+
|
1594
|
+
<p class="tag_title">Returns:</p>
|
1595
|
+
<ul class="return">
|
1596
|
+
|
1597
|
+
<li>
|
1598
|
+
|
1599
|
+
|
1600
|
+
<span class='type'></span>
|
1601
|
+
|
1602
|
+
|
1603
|
+
|
1604
|
+
|
1605
|
+
<div class='inline'><p>clean string</p>
|
1606
|
+
</div>
|
1607
|
+
|
1608
|
+
</li>
|
1609
|
+
|
1610
|
+
</ul>
|
1611
|
+
|
1612
|
+
</div>
|
1613
|
+
</div>
|
1614
|
+
|
1615
|
+
<div class="method_details ">
|
1616
|
+
<h3 class="signature " id="uncolor!-instance_method">
|
1617
|
+
|
1618
|
+
#<strong>uncolor!</strong> ⇒ <tt>Object</tt>
|
1619
|
+
|
1620
|
+
|
1621
|
+
|
1622
|
+
|
1623
|
+
|
1624
|
+
</h3>
|
1625
|
+
</div>
|
1626
|
+
|
1627
|
+
<div class="method_details ">
|
1628
|
+
<h3 class="signature " id="wrap-instance_method">
|
1629
|
+
|
1630
|
+
#<strong>wrap</strong>(len, pad: 0, indent: ' ', offset: 0, prefix: '', after: '', reset: '') ⇒ <tt>Object</tt>
|
1631
|
+
|
1632
|
+
|
1633
|
+
|
1634
|
+
|
1635
|
+
|
1636
|
+
</h3><div class="docstring">
|
1637
|
+
<div class="discussion">
|
1638
|
+
<p>Wrap string at word breaks, respecting tags</p>
|
1639
|
+
|
1640
|
+
|
1641
|
+
</div>
|
1642
|
+
</div>
|
1643
|
+
<div class="tags">
|
1644
|
+
<p class="tag_title">Parameters:</p>
|
1645
|
+
<ul class="param">
|
1646
|
+
|
1647
|
+
<li>
|
1648
|
+
|
1649
|
+
<span class='name'>len</span>
|
1650
|
+
|
1651
|
+
|
1652
|
+
<span class='type'>(<tt>Integer</tt>)</span>
|
1653
|
+
|
1654
|
+
|
1655
|
+
|
1656
|
+
—
|
1657
|
+
<div class='inline'><p>The length</p>
|
1658
|
+
</div>
|
1659
|
+
|
1660
|
+
</li>
|
1661
|
+
|
1662
|
+
<li>
|
1663
|
+
|
1664
|
+
<span class='name'>offset</span>
|
1665
|
+
|
1666
|
+
|
1667
|
+
<span class='type'>(<tt>Integer</tt>)</span>
|
1668
|
+
|
1669
|
+
|
1670
|
+
<em class="default">(defaults to: <tt>0</tt>)</em>
|
1671
|
+
|
1672
|
+
|
1673
|
+
—
|
1674
|
+
<div class='inline'><p>(Optional) The width to pad each subsequent line</p>
|
1675
|
+
</div>
|
1676
|
+
|
1677
|
+
</li>
|
1678
|
+
|
1679
|
+
<li>
|
1680
|
+
|
1681
|
+
<span class='name'>prefix</span>
|
1682
|
+
|
1683
|
+
|
1684
|
+
<span class='type'>(<tt><span class='object_link'><a href="" title="String (class)">String</a></span></tt>)</span>
|
1685
|
+
|
1686
|
+
|
1687
|
+
<em class="default">(defaults to: <tt>''</tt>)</em>
|
1688
|
+
|
1689
|
+
|
1690
|
+
—
|
1691
|
+
<div class='inline'><p>(Optional) A prefix to add to each line</p>
|
1692
|
+
</div>
|
1693
|
+
|
1694
|
+
</li>
|
1695
|
+
|
1696
|
+
</ul>
|
1697
|
+
|
1698
|
+
|
1699
|
+
</div>
|
1700
|
+
</div>
|
1701
|
+
|
1702
|
+
</div>
|
1703
|
+
|
1704
|
+
</div>
|
1705
|
+
|
1706
|
+
<div id="footer">
|
1707
|
+
Generated on Thu Nov 18 16:39:12 2021 by
|
1708
|
+
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
1709
|
+
0.9.26 (ruby-3.0.1).
|
1710
|
+
</div>
|
1711
|
+
|
1712
|
+
</div>
|
1713
|
+
</body>
|
1714
|
+
</html>
|