doing 2.0.22 → 2.1.0pre
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 +18 -15
- data/.yardoc/object_types +0 -0
- data/.yardoc/objects/root.dat +0 -0
- data/CHANGELOG.md +36 -1
- data/Gemfile.lock +8 -1
- data/README.md +7 -1
- data/Rakefile +23 -4
- data/bin/doing +323 -173
- data/doc/Array.html +354 -1
- data/doc/Doing/Color.html +104 -92
- data/doc/Doing/Completion.html +216 -0
- data/doc/Doing/Configuration.html +340 -5
- data/doc/Doing/Content.html +229 -0
- data/doc/Doing/Errors/DoingNoTraceError.html +1 -1
- data/doc/Doing/Errors/DoingRuntimeError.html +1 -1
- data/doc/Doing/Errors/DoingStandardError.html +1 -1
- data/doc/Doing/Errors/EmptyInput.html +1 -1
- data/doc/Doing/Errors/NoResults.html +1 -1
- data/doc/Doing/Errors/PluginException.html +1 -1
- data/doc/Doing/Errors/UserCancelled.html +1 -1
- data/doc/Doing/Errors/WrongCommand.html +1 -1
- data/doc/Doing/Errors.html +1 -1
- data/doc/Doing/Hooks.html +1 -1
- data/doc/Doing/Item.html +337 -49
- data/doc/Doing/Items.html +444 -35
- data/doc/Doing/LogAdapter.html +139 -51
- data/doc/Doing/Note.html +253 -22
- data/doc/Doing/Pager.html +74 -36
- data/doc/Doing/Plugins.html +1 -1
- data/doc/Doing/Prompt.html +674 -0
- data/doc/Doing/Section.html +354 -0
- data/doc/Doing/Util.html +57 -1
- data/doc/Doing/WWID.html +477 -670
- data/doc/Doing/WWIDFile.html +398 -0
- data/doc/Doing.html +5 -5
- data/doc/GLI/Commands/MarkdownDocumentListener.html +1 -1
- data/doc/GLI/Commands.html +1 -1
- data/doc/GLI.html +1 -1
- data/doc/Hash.html +97 -1
- data/doc/Status.html +37 -3
- data/doc/String.html +599 -23
- data/doc/Symbol.html +3 -3
- data/doc/Time.html +1 -1
- data/doc/_index.html +22 -1
- data/doc/class_list.html +1 -1
- data/doc/file.README.html +8 -2
- data/doc/index.html +8 -2
- data/doc/method_list.html +453 -173
- data/doc/top-level-namespace.html +1 -1
- data/doing.gemspec +3 -0
- data/doing.rdoc +79 -27
- data/example_plugin.rb +5 -5
- data/lib/completion/_doing.zsh +42 -42
- data/lib/completion/doing.bash +10 -10
- data/lib/completion/doing.fish +1 -280
- data/lib/doing/array.rb +36 -0
- data/lib/doing/colors.rb +70 -66
- data/lib/doing/completion/bash_completion.rb +1 -2
- data/lib/doing/completion/fish_completion.rb +1 -1
- data/lib/doing/completion/zsh_completion.rb +1 -1
- data/lib/doing/completion.rb +6 -0
- data/lib/doing/configuration.rb +134 -23
- data/lib/doing/hash.rb +37 -0
- data/lib/doing/item.rb +77 -12
- data/lib/doing/items.rb +125 -0
- data/lib/doing/log_adapter.rb +58 -4
- data/lib/doing/note.rb +53 -1
- data/lib/doing/pager.rb +49 -38
- data/lib/doing/plugins/export/markdown_export.rb +4 -4
- data/lib/doing/plugins/export/template_export.rb +2 -2
- data/lib/doing/plugins/import/calendar_import.rb +4 -4
- data/lib/doing/plugins/import/doing_import.rb +5 -7
- data/lib/doing/plugins/import/timing_import.rb +3 -3
- data/lib/doing/prompt.rb +206 -0
- data/lib/doing/section.rb +30 -0
- data/lib/doing/string.rb +123 -35
- data/lib/doing/util.rb +14 -6
- data/lib/doing/version.rb +1 -1
- data/lib/doing/wwid.rb +307 -614
- data/lib/doing.rb +6 -2
- data/lib/examples/plugins/capture_thing_import.rb +162 -0
- data/rdoc_to_mmd.rb +14 -8
- data/scripts/generate_bash_completions.rb +1 -1
- data/scripts/generate_fish_completions.rb +1 -1
- data/scripts/generate_zsh_completions.rb +1 -1
- metadata +73 -5
- data/lib/doing/wwidfile.rb +0 -117
data/doc/String.html
CHANGED
@@ -199,6 +199,74 @@
|
|
199
199
|
<span class="summary_desc"><div class='inline'><p>Capitalize on the first character on string.</p>
|
200
200
|
</div></span>
|
201
201
|
|
202
|
+
</li>
|
203
|
+
|
204
|
+
|
205
|
+
<li class="public ">
|
206
|
+
<span class="summary_signature">
|
207
|
+
|
208
|
+
<a href="#clean_unlinked_urls-instance_method" title="#clean_unlinked_urls (instance method)">#<strong>clean_unlinked_urls</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'><p>Clean up unlinked <urls>.</p>
|
223
|
+
</div></span>
|
224
|
+
|
225
|
+
</li>
|
226
|
+
|
227
|
+
|
228
|
+
<li class="public ">
|
229
|
+
<span class="summary_signature">
|
230
|
+
|
231
|
+
<a href="#compress-instance_method" title="#compress (instance method)">#<strong>compress</strong> ⇒ Object </a>
|
232
|
+
|
233
|
+
|
234
|
+
|
235
|
+
</span>
|
236
|
+
|
237
|
+
|
238
|
+
|
239
|
+
|
240
|
+
|
241
|
+
|
242
|
+
|
243
|
+
|
244
|
+
|
245
|
+
<span class="summary_desc"><div class='inline'><p>Compress multiple spaces to single space.</p>
|
246
|
+
</div></span>
|
247
|
+
|
248
|
+
</li>
|
249
|
+
|
250
|
+
|
251
|
+
<li class="public ">
|
252
|
+
<span class="summary_signature">
|
253
|
+
|
254
|
+
<a href="#compress!-instance_method" title="#compress! (instance method)">#<strong>compress!</strong> ⇒ Object </a>
|
255
|
+
|
256
|
+
|
257
|
+
|
258
|
+
</span>
|
259
|
+
|
260
|
+
|
261
|
+
|
262
|
+
|
263
|
+
|
264
|
+
|
265
|
+
|
266
|
+
|
267
|
+
|
268
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
269
|
+
|
202
270
|
</li>
|
203
271
|
|
204
272
|
|
@@ -318,7 +386,53 @@
|
|
318
386
|
<li class="public ">
|
319
387
|
<span class="summary_signature">
|
320
388
|
|
321
|
-
<a href="#
|
389
|
+
<a href="#is_rx%3F-instance_method" title="#is_rx? (instance method)">#<strong>is_rx?</strong> ⇒ Boolean </a>
|
390
|
+
|
391
|
+
|
392
|
+
|
393
|
+
</span>
|
394
|
+
|
395
|
+
|
396
|
+
|
397
|
+
|
398
|
+
|
399
|
+
|
400
|
+
|
401
|
+
|
402
|
+
|
403
|
+
<span class="summary_desc"><div class='inline'><p>Determines if receiver is surrounded by slashes or starts with single quote.</p>
|
404
|
+
</div></span>
|
405
|
+
|
406
|
+
</li>
|
407
|
+
|
408
|
+
|
409
|
+
<li class="public ">
|
410
|
+
<span class="summary_signature">
|
411
|
+
|
412
|
+
<a href="#last_color-instance_method" title="#last_color (instance method)">#<strong>last_color</strong> ⇒ String </a>
|
413
|
+
|
414
|
+
|
415
|
+
|
416
|
+
</span>
|
417
|
+
|
418
|
+
|
419
|
+
|
420
|
+
|
421
|
+
|
422
|
+
|
423
|
+
|
424
|
+
|
425
|
+
|
426
|
+
<span class="summary_desc"><div class='inline'><p>Returns the last escape sequence from a string.</p>
|
427
|
+
</div></span>
|
428
|
+
|
429
|
+
</li>
|
430
|
+
|
431
|
+
|
432
|
+
<li class="public ">
|
433
|
+
<span class="summary_signature">
|
434
|
+
|
435
|
+
<a href="#link_urls-instance_method" title="#link_urls (instance method)">#<strong>link_urls</strong>(**opt) ⇒ Object </a>
|
322
436
|
|
323
437
|
|
324
438
|
|
@@ -340,7 +454,7 @@
|
|
340
454
|
<li class="public ">
|
341
455
|
<span class="summary_signature">
|
342
456
|
|
343
|
-
<a href="#link_urls!-instance_method" title="#link_urls! (instance method)">#<strong>link_urls!</strong>(opt
|
457
|
+
<a href="#link_urls!-instance_method" title="#link_urls! (instance method)">#<strong>link_urls!</strong>(**opt) ⇒ Object </a>
|
344
458
|
|
345
459
|
|
346
460
|
|
@@ -542,7 +656,7 @@
|
|
542
656
|
<li class="public ">
|
543
657
|
<span class="summary_signature">
|
544
658
|
|
545
|
-
<a href="#
|
659
|
+
<a href="#remove_self_links-instance_method" title="#remove_self_links (instance method)">#<strong>remove_self_links</strong> ⇒ Object </a>
|
546
660
|
|
547
661
|
|
548
662
|
|
@@ -556,7 +670,31 @@
|
|
556
670
|
|
557
671
|
|
558
672
|
|
559
|
-
<span class="summary_desc"><div class='inline'
|
673
|
+
<span class="summary_desc"><div class='inline'><p>Remove <self-linked> formatting.</p>
|
674
|
+
</div></span>
|
675
|
+
|
676
|
+
</li>
|
677
|
+
|
678
|
+
|
679
|
+
<li class="public ">
|
680
|
+
<span class="summary_signature">
|
681
|
+
|
682
|
+
<a href="#replace_qualified_urls-instance_method" title="#replace_qualified_urls (instance method)">#<strong>replace_qualified_urls</strong>(**options) ⇒ Object </a>
|
683
|
+
|
684
|
+
|
685
|
+
|
686
|
+
</span>
|
687
|
+
|
688
|
+
|
689
|
+
|
690
|
+
|
691
|
+
|
692
|
+
|
693
|
+
|
694
|
+
|
695
|
+
|
696
|
+
<span class="summary_desc"><div class='inline'><p>Replace qualified urls.</p>
|
697
|
+
</div></span>
|
560
698
|
|
561
699
|
</li>
|
562
700
|
|
@@ -564,7 +702,7 @@
|
|
564
702
|
<li class="public ">
|
565
703
|
<span class="summary_signature">
|
566
704
|
|
567
|
-
<a href="#
|
705
|
+
<a href="#set_type-instance_method" title="#set_type (instance method)">#<strong>set_type</strong>(kind = nil) ⇒ Object </a>
|
568
706
|
|
569
707
|
|
570
708
|
|
@@ -586,7 +724,53 @@
|
|
586
724
|
<li class="public ">
|
587
725
|
<span class="summary_signature">
|
588
726
|
|
589
|
-
<a href="#
|
727
|
+
<a href="#tag-instance_method" title="#tag (instance method)">#<strong>tag</strong>(tag, value: nil, remove: false, rename_to: nil, regex: false, single: false, force: false) ⇒ String </a>
|
728
|
+
|
729
|
+
|
730
|
+
|
731
|
+
</span>
|
732
|
+
|
733
|
+
|
734
|
+
|
735
|
+
|
736
|
+
|
737
|
+
|
738
|
+
|
739
|
+
|
740
|
+
|
741
|
+
<span class="summary_desc"><div class='inline'><p>Add, rename, or remove a tag.</p>
|
742
|
+
</div></span>
|
743
|
+
|
744
|
+
</li>
|
745
|
+
|
746
|
+
|
747
|
+
<li class="public ">
|
748
|
+
<span class="summary_signature">
|
749
|
+
|
750
|
+
<a href="#tag!-instance_method" title="#tag! (instance method)">#<strong>tag!</strong>(tag, **options) ⇒ Object </a>
|
751
|
+
|
752
|
+
|
753
|
+
|
754
|
+
</span>
|
755
|
+
|
756
|
+
|
757
|
+
|
758
|
+
|
759
|
+
|
760
|
+
|
761
|
+
|
762
|
+
|
763
|
+
|
764
|
+
<span class="summary_desc"><div class='inline'><p>Add, rename, or remove a tag in place.</p>
|
765
|
+
</div></span>
|
766
|
+
|
767
|
+
</li>
|
768
|
+
|
769
|
+
|
770
|
+
<li class="public ">
|
771
|
+
<span class="summary_signature">
|
772
|
+
|
773
|
+
<a href="#to_rx-instance_method" title="#to_rx (instance method)">#<strong>to_rx</strong>(distance: 3, case_type: :smart) ⇒ Regexp </a>
|
590
774
|
|
591
775
|
|
592
776
|
|
@@ -789,7 +973,7 @@
|
|
789
973
|
<li class="public ">
|
790
974
|
<span class="summary_signature">
|
791
975
|
|
792
|
-
<a href="#wrap-instance_method" title="#wrap (instance method)">#<strong>wrap</strong>(len, pad: 0, indent: ' ', offset: 0, prefix: '', after: '', reset: '') ⇒ Object </a>
|
976
|
+
<a href="#wrap-instance_method" title="#wrap (instance method)">#<strong>wrap</strong>(len, pad: 0, indent: ' ', offset: 0, prefix: '', color: '', after: '', reset: '') ⇒ Object </a>
|
793
977
|
|
794
978
|
|
795
979
|
|
@@ -822,7 +1006,7 @@
|
|
822
1006
|
|
823
1007
|
|
824
1008
|
<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
|
1009
|
+
<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%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
1010
|
|
827
1011
|
|
828
1012
|
<div id="instance_method_details" class="method_details_list">
|
@@ -890,6 +1074,62 @@
|
|
890
1074
|
</ul>
|
891
1075
|
|
892
1076
|
</div>
|
1077
|
+
</div>
|
1078
|
+
|
1079
|
+
<div class="method_details ">
|
1080
|
+
<h3 class="signature " id="clean_unlinked_urls-instance_method">
|
1081
|
+
|
1082
|
+
#<strong>clean_unlinked_urls</strong> ⇒ <tt>Object</tt>
|
1083
|
+
|
1084
|
+
|
1085
|
+
|
1086
|
+
|
1087
|
+
|
1088
|
+
</h3><div class="docstring">
|
1089
|
+
<div class="discussion">
|
1090
|
+
<p>Clean up unlinked <urls></p>
|
1091
|
+
|
1092
|
+
|
1093
|
+
</div>
|
1094
|
+
</div>
|
1095
|
+
<div class="tags">
|
1096
|
+
|
1097
|
+
|
1098
|
+
</div>
|
1099
|
+
</div>
|
1100
|
+
|
1101
|
+
<div class="method_details ">
|
1102
|
+
<h3 class="signature " id="compress-instance_method">
|
1103
|
+
|
1104
|
+
#<strong>compress</strong> ⇒ <tt>Object</tt>
|
1105
|
+
|
1106
|
+
|
1107
|
+
|
1108
|
+
|
1109
|
+
|
1110
|
+
</h3><div class="docstring">
|
1111
|
+
<div class="discussion">
|
1112
|
+
<p>Compress multiple spaces to single space</p>
|
1113
|
+
|
1114
|
+
|
1115
|
+
</div>
|
1116
|
+
</div>
|
1117
|
+
<div class="tags">
|
1118
|
+
|
1119
|
+
|
1120
|
+
</div>
|
1121
|
+
</div>
|
1122
|
+
|
1123
|
+
<div class="method_details ">
|
1124
|
+
<h3 class="signature " id="compress!-instance_method">
|
1125
|
+
|
1126
|
+
#<strong>compress!</strong> ⇒ <tt>Object</tt>
|
1127
|
+
|
1128
|
+
|
1129
|
+
|
1130
|
+
|
1131
|
+
|
1132
|
+
</h3>
|
893
1133
|
</div>
|
894
1134
|
|
895
1135
|
<div class="method_details ">
|
@@ -1081,13 +1321,98 @@
|
|
1081
1321
|
|
1082
1322
|
</ul>
|
1083
1323
|
|
1324
|
+
</div>
|
1325
|
+
</div>
|
1326
|
+
|
1327
|
+
<div class="method_details ">
|
1328
|
+
<h3 class="signature " id="is_rx?-instance_method">
|
1329
|
+
|
1330
|
+
#<strong>is_rx?</strong> ⇒ <tt>Boolean</tt>
|
1331
|
+
|
1332
|
+
|
1333
|
+
|
1334
|
+
|
1335
|
+
|
1336
|
+
</h3><div class="docstring">
|
1337
|
+
<div class="discussion">
|
1338
|
+
<p>Determines if receiver is surrounded by slashes or starts with single quote</p>
|
1339
|
+
|
1340
|
+
|
1341
|
+
</div>
|
1342
|
+
</div>
|
1343
|
+
<div class="tags">
|
1344
|
+
|
1345
|
+
<p class="tag_title">Returns:</p>
|
1346
|
+
<ul class="return">
|
1347
|
+
|
1348
|
+
<li>
|
1349
|
+
|
1350
|
+
|
1351
|
+
<span class='type'>(<tt>Boolean</tt>)</span>
|
1352
|
+
|
1353
|
+
|
1354
|
+
|
1355
|
+
—
|
1356
|
+
<div class='inline'><p>True if regex, False otherwise.</p>
|
1357
|
+
</div>
|
1358
|
+
|
1359
|
+
</li>
|
1360
|
+
|
1361
|
+
</ul>
|
1362
|
+
|
1363
|
+
</div>
|
1364
|
+
</div>
|
1365
|
+
|
1366
|
+
<div class="method_details ">
|
1367
|
+
<h3 class="signature " id="last_color-instance_method">
|
1368
|
+
|
1369
|
+
#<strong>last_color</strong> ⇒ <tt><span class='object_link'><a href="" title="String (class)">String</a></span></tt>
|
1370
|
+
|
1371
|
+
|
1372
|
+
|
1373
|
+
|
1374
|
+
|
1375
|
+
</h3><div class="docstring">
|
1376
|
+
<div class="discussion">
|
1377
|
+
<p>Returns the last escape sequence from a string.</p>
|
1378
|
+
|
1379
|
+
<p>Actually returns all escape codes, with the assumption
|
1380
|
+
that the result of inserting them will generate the
|
1381
|
+
same color as was set at the end of the string.
|
1382
|
+
Because you can send modifiers like dark and bold
|
1383
|
+
separate from color codes, only using the last code
|
1384
|
+
may not render the same style.</p>
|
1385
|
+
|
1386
|
+
|
1387
|
+
</div>
|
1388
|
+
</div>
|
1389
|
+
<div class="tags">
|
1390
|
+
|
1391
|
+
<p class="tag_title">Returns:</p>
|
1392
|
+
<ul class="return">
|
1393
|
+
|
1394
|
+
<li>
|
1395
|
+
|
1396
|
+
|
1397
|
+
<span class='type'>(<tt><span class='object_link'><a href="" title="String (class)">String</a></span></tt>)</span>
|
1398
|
+
|
1399
|
+
|
1400
|
+
|
1401
|
+
—
|
1402
|
+
<div class='inline'><p>All escape codes in string</p>
|
1403
|
+
</div>
|
1404
|
+
|
1405
|
+
</li>
|
1406
|
+
|
1407
|
+
</ul>
|
1408
|
+
|
1084
1409
|
</div>
|
1085
1410
|
</div>
|
1086
1411
|
|
1087
1412
|
<div class="method_details ">
|
1088
1413
|
<h3 class="signature " id="link_urls-instance_method">
|
1089
1414
|
|
1090
|
-
#<strong>link_urls</strong>(opt
|
1415
|
+
#<strong>link_urls</strong>(**opt) ⇒ <tt>Object</tt>
|
1091
1416
|
|
1092
1417
|
|
1093
1418
|
|
@@ -1099,7 +1424,7 @@
|
|
1099
1424
|
<div class="method_details ">
|
1100
1425
|
<h3 class="signature " id="link_urls!-instance_method">
|
1101
1426
|
|
1102
|
-
#<strong>link_urls!</strong>(opt
|
1427
|
+
#<strong>link_urls!</strong>(**opt) ⇒ <tt>Object</tt>
|
1103
1428
|
|
1104
1429
|
|
1105
1430
|
|
@@ -1124,8 +1449,6 @@
|
|
1124
1449
|
<span class='type'>(<tt><span class='object_link'><a href="Hash.html" title="Hash (class)">Hash</a></span></tt>)</span>
|
1125
1450
|
|
1126
1451
|
|
1127
|
-
<em class="default">(defaults to: <tt>{}</tt>)</em>
|
1128
|
-
|
1129
1452
|
|
1130
1453
|
—
|
1131
1454
|
<div class='inline'><p>Additional Options</p>
|
@@ -1231,7 +1554,7 @@
|
|
1231
1554
|
|
1232
1555
|
|
1233
1556
|
|
1234
|
-
<div class='inline'><p>Symbol :smart, :sensitive, :
|
1557
|
+
<div class='inline'><p>Symbol :smart, :sensitive, :ignore</p>
|
1235
1558
|
</div>
|
1236
1559
|
|
1237
1560
|
</li>
|
@@ -1317,33 +1640,254 @@
|
|
1317
1640
|
</div>
|
1318
1641
|
|
1319
1642
|
<div class="method_details ">
|
1320
|
-
<h3 class="signature " id="
|
1643
|
+
<h3 class="signature " id="remove_self_links-instance_method">
|
1644
|
+
|
1645
|
+
#<strong>remove_self_links</strong> ⇒ <tt>Object</tt>
|
1646
|
+
|
1647
|
+
|
1648
|
+
|
1649
|
+
|
1650
|
+
|
1651
|
+
</h3><div class="docstring">
|
1652
|
+
<div class="discussion">
|
1653
|
+
<p>Remove <self-linked> formatting</p>
|
1654
|
+
|
1655
|
+
|
1656
|
+
</div>
|
1657
|
+
</div>
|
1658
|
+
<div class="tags">
|
1659
|
+
|
1660
|
+
|
1661
|
+
</div>
|
1662
|
+
</div>
|
1663
|
+
|
1664
|
+
<div class="method_details ">
|
1665
|
+
<h3 class="signature " id="replace_qualified_urls-instance_method">
|
1666
|
+
|
1667
|
+
#<strong>replace_qualified_urls</strong>(**options) ⇒ <tt>Object</tt>
|
1668
|
+
|
1669
|
+
|
1670
|
+
|
1671
|
+
|
1321
1672
|
|
1322
|
-
|
1673
|
+
</h3><div class="docstring">
|
1674
|
+
<div class="discussion">
|
1675
|
+
<p>Replace qualified urls</p>
|
1676
|
+
|
1677
|
+
|
1678
|
+
</div>
|
1679
|
+
</div>
|
1680
|
+
<div class="tags">
|
1681
|
+
|
1682
|
+
|
1683
|
+
</div>
|
1684
|
+
</div>
|
1685
|
+
|
1686
|
+
<div class="method_details ">
|
1687
|
+
<h3 class="signature " id="set_type-instance_method">
|
1688
|
+
|
1689
|
+
#<strong>set_type</strong>(kind = nil) ⇒ <tt>Object</tt>
|
1323
1690
|
|
1324
1691
|
|
1325
1692
|
|
1326
1693
|
|
1327
1694
|
|
1328
1695
|
</h3>
|
1696
|
+
</div>
|
1697
|
+
|
1698
|
+
<div class="method_details ">
|
1699
|
+
<h3 class="signature " id="tag-instance_method">
|
1700
|
+
|
1701
|
+
#<strong>tag</strong>(tag, value: nil, remove: false, rename_to: nil, regex: false, single: false, force: false) ⇒ <tt><span class='object_link'><a href="" title="String (class)">String</a></span></tt>
|
1702
|
+
|
1703
|
+
|
1704
|
+
|
1705
|
+
|
1706
|
+
|
1707
|
+
</h3><div class="docstring">
|
1708
|
+
<div class="discussion">
|
1709
|
+
<p>Add, rename, or remove a tag</p>
|
1710
|
+
|
1711
|
+
|
1712
|
+
</div>
|
1713
|
+
</div>
|
1714
|
+
<div class="tags">
|
1715
|
+
<p class="tag_title">Parameters:</p>
|
1716
|
+
<ul class="param">
|
1717
|
+
|
1718
|
+
<li>
|
1719
|
+
|
1720
|
+
<span class='name'>tag</span>
|
1721
|
+
|
1722
|
+
|
1723
|
+
<span class='type'></span>
|
1724
|
+
|
1725
|
+
|
1726
|
+
|
1727
|
+
—
|
1728
|
+
<div class='inline'><p>The tag</p>
|
1729
|
+
</div>
|
1730
|
+
|
1731
|
+
</li>
|
1732
|
+
|
1733
|
+
<li>
|
1734
|
+
|
1735
|
+
<span class='name'>value</span>
|
1736
|
+
|
1737
|
+
|
1738
|
+
<span class='type'>(<tt><span class='object_link'><a href="" title="String (class)">String</a></span></tt>)</span>
|
1739
|
+
|
1740
|
+
|
1741
|
+
<em class="default">(defaults to: <tt>nil</tt>)</em>
|
1742
|
+
|
1743
|
+
|
1744
|
+
—
|
1745
|
+
<div class='inline'><p>Value for tag (@tag(value))</p>
|
1746
|
+
</div>
|
1747
|
+
|
1748
|
+
</li>
|
1749
|
+
|
1750
|
+
<li>
|
1751
|
+
|
1752
|
+
<span class='name'>remove</span>
|
1753
|
+
|
1754
|
+
|
1755
|
+
<span class='type'>(<tt>Boolean</tt>)</span>
|
1756
|
+
|
1757
|
+
|
1758
|
+
<em class="default">(defaults to: <tt>false</tt>)</em>
|
1759
|
+
|
1760
|
+
|
1761
|
+
—
|
1762
|
+
<div class='inline'><p>Remove the tag instead of adding</p>
|
1763
|
+
</div>
|
1764
|
+
|
1765
|
+
</li>
|
1766
|
+
|
1767
|
+
<li>
|
1768
|
+
|
1769
|
+
<span class='name'>rename_to</span>
|
1770
|
+
|
1771
|
+
|
1772
|
+
<span class='type'>(<tt><span class='object_link'><a href="" title="String (class)">String</a></span></tt>)</span>
|
1773
|
+
|
1774
|
+
|
1775
|
+
<em class="default">(defaults to: <tt>nil</tt>)</em>
|
1776
|
+
|
1777
|
+
|
1778
|
+
—
|
1779
|
+
<div class='inline'><p>Replace tag with this tag</p>
|
1780
|
+
</div>
|
1781
|
+
|
1782
|
+
</li>
|
1783
|
+
|
1784
|
+
<li>
|
1785
|
+
|
1786
|
+
<span class='name'>regex</span>
|
1787
|
+
|
1788
|
+
|
1789
|
+
<span class='type'>(<tt>Boolean</tt>)</span>
|
1790
|
+
|
1791
|
+
|
1792
|
+
<em class="default">(defaults to: <tt>false</tt>)</em>
|
1793
|
+
|
1794
|
+
|
1795
|
+
—
|
1796
|
+
<div class='inline'><p>Tag is regular expression</p>
|
1797
|
+
</div>
|
1798
|
+
|
1799
|
+
</li>
|
1800
|
+
|
1801
|
+
<li>
|
1802
|
+
|
1803
|
+
<span class='name'>single</span>
|
1804
|
+
|
1805
|
+
|
1806
|
+
<span class='type'>(<tt>Boolean</tt>)</span>
|
1807
|
+
|
1808
|
+
|
1809
|
+
<em class="default">(defaults to: <tt>false</tt>)</em>
|
1810
|
+
|
1811
|
+
|
1812
|
+
—
|
1813
|
+
<div class='inline'><p>Operating on a single item (for logging)</p>
|
1814
|
+
</div>
|
1815
|
+
|
1816
|
+
</li>
|
1817
|
+
|
1818
|
+
<li>
|
1819
|
+
|
1820
|
+
<span class='name'>force</span>
|
1821
|
+
|
1822
|
+
|
1823
|
+
<span class='type'>(<tt>Boolean</tt>)</span>
|
1824
|
+
|
1825
|
+
|
1826
|
+
<em class="default">(defaults to: <tt>false</tt>)</em>
|
1827
|
+
|
1828
|
+
|
1829
|
+
—
|
1830
|
+
<div class='inline'><p>With rename_to, add tag if it doesn't exist</p>
|
1831
|
+
</div>
|
1832
|
+
|
1833
|
+
</li>
|
1834
|
+
|
1835
|
+
</ul>
|
1836
|
+
|
1837
|
+
<p class="tag_title">Returns:</p>
|
1838
|
+
<ul class="return">
|
1839
|
+
|
1840
|
+
<li>
|
1841
|
+
|
1842
|
+
|
1843
|
+
<span class='type'>(<tt><span class='object_link'><a href="" title="String (class)">String</a></span></tt>)</span>
|
1844
|
+
|
1845
|
+
|
1846
|
+
|
1847
|
+
—
|
1848
|
+
<div class='inline'><p>The string with modified tags</p>
|
1849
|
+
</div>
|
1850
|
+
|
1851
|
+
</li>
|
1852
|
+
|
1853
|
+
</ul>
|
1854
|
+
|
1855
|
+
</div>
|
1329
1856
|
</div>
|
1330
1857
|
|
1331
1858
|
<div class="method_details ">
|
1332
1859
|
<h3 class="signature " id="tag!-instance_method">
|
1333
1860
|
|
1334
|
-
#<strong>tag!</strong>(tag,
|
1861
|
+
#<strong>tag!</strong>(tag, **options) ⇒ <tt>Object</tt>
|
1335
1862
|
|
1336
1863
|
|
1337
1864
|
|
1338
1865
|
|
1339
1866
|
|
1340
|
-
</h3>
|
1867
|
+
</h3><div class="docstring">
|
1868
|
+
<div class="discussion">
|
1869
|
+
<p>Add, rename, or remove a tag in place</p>
|
1870
|
+
|
1871
|
+
|
1872
|
+
</div>
|
1873
|
+
</div>
|
1874
|
+
<div class="tags">
|
1875
|
+
|
1876
|
+
|
1877
|
+
<p class="tag_title">See Also:</p>
|
1878
|
+
<ul class="see">
|
1879
|
+
|
1880
|
+
<li><span class='object_link'><a href="#tag-instance_method" title="String#tag (method)">#tag</a></span></li>
|
1881
|
+
|
1882
|
+
</ul>
|
1883
|
+
|
1884
|
+
</div>
|
1341
1885
|
</div>
|
1342
1886
|
|
1343
1887
|
<div class="method_details ">
|
1344
1888
|
<h3 class="signature " id="to_rx-instance_method">
|
1345
1889
|
|
1346
|
-
#<strong>to_rx</strong>(distance) ⇒ <tt
|
1890
|
+
#<strong>to_rx</strong>(distance: 3, case_type: :smart) ⇒ <tt>Regexp</tt>
|
1347
1891
|
|
1348
1892
|
|
1349
1893
|
|
@@ -1351,13 +1895,26 @@
|
|
1351
1895
|
|
1352
1896
|
</h3><div class="docstring">
|
1353
1897
|
<div class="discussion">
|
1354
|
-
<p>Convert string to fuzzy regex
|
1898
|
+
<p>Convert string to fuzzy regex. Characters in words
|
1899
|
+
can be separated by up to <em>distance</em> characters in
|
1900
|
+
haystack, spaces indicate unlimited distance.</p>
|
1355
1901
|
|
1356
1902
|
|
1357
1903
|
</div>
|
1358
1904
|
</div>
|
1359
1905
|
<div class="tags">
|
1360
|
-
|
1906
|
+
|
1907
|
+
<div class="examples">
|
1908
|
+
<p class="tag_title">Examples:</p>
|
1909
|
+
|
1910
|
+
|
1911
|
+
<p class="example_title"><div class='inline'><p><code>"this word".to_rx(2) => /t.{0,3}h.{0,3}i.{0,3}s.{0,3}.*?w.{0,3}o.{0,3}r.{0,3}d/</code></p>
|
1912
|
+
</div></p>
|
1913
|
+
|
1914
|
+
<pre class="example code"><code></code></pre>
|
1915
|
+
|
1916
|
+
</div>
|
1917
|
+
<p class="tag_title">Parameters:</p>
|
1361
1918
|
<ul class="param">
|
1362
1919
|
|
1363
1920
|
<li>
|
@@ -1368,6 +1925,8 @@
|
|
1368
1925
|
<span class='type'>(<tt>Integer</tt>)</span>
|
1369
1926
|
|
1370
1927
|
|
1928
|
+
<em class="default">(defaults to: <tt>3</tt>)</em>
|
1929
|
+
|
1371
1930
|
|
1372
1931
|
—
|
1373
1932
|
<div class='inline'><p>Allowed distance
|
@@ -1376,6 +1935,23 @@ between characters</p>
|
|
1376
1935
|
|
1377
1936
|
</li>
|
1378
1937
|
|
1938
|
+
<li>
|
1939
|
+
|
1940
|
+
<span class='name'>case_type</span>
|
1941
|
+
|
1942
|
+
|
1943
|
+
<span class='type'></span>
|
1944
|
+
|
1945
|
+
|
1946
|
+
<em class="default">(defaults to: <tt>:smart</tt>)</em>
|
1947
|
+
|
1948
|
+
|
1949
|
+
—
|
1950
|
+
<div class='inline'><p>The case type</p>
|
1951
|
+
</div>
|
1952
|
+
|
1953
|
+
</li>
|
1954
|
+
|
1379
1955
|
</ul>
|
1380
1956
|
|
1381
1957
|
<p class="tag_title">Returns:</p>
|
@@ -1384,7 +1960,7 @@ between characters</p>
|
|
1384
1960
|
<li>
|
1385
1961
|
|
1386
1962
|
|
1387
|
-
<span class='type'>(<tt
|
1963
|
+
<span class='type'>(<tt>Regexp</tt>)</span>
|
1388
1964
|
|
1389
1965
|
|
1390
1966
|
|
@@ -1627,7 +2203,7 @@ between characters</p>
|
|
1627
2203
|
<div class="method_details ">
|
1628
2204
|
<h3 class="signature " id="wrap-instance_method">
|
1629
2205
|
|
1630
|
-
#<strong>wrap</strong>(len, pad: 0, indent: ' ', offset: 0, prefix: '', after: '', reset: '') ⇒ <tt>Object</tt>
|
2206
|
+
#<strong>wrap</strong>(len, pad: 0, indent: ' ', offset: 0, prefix: '', color: '', after: '', reset: '') ⇒ <tt>Object</tt>
|
1631
2207
|
|
1632
2208
|
|
1633
2209
|
|
@@ -1704,7 +2280,7 @@ between characters</p>
|
|
1704
2280
|
</div>
|
1705
2281
|
|
1706
2282
|
<div id="footer">
|
1707
|
-
Generated on
|
2283
|
+
Generated on Sat Nov 27 10:06:03 2021 by
|
1708
2284
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
1709
2285
|
0.9.26 (ruby-3.0.1).
|
1710
2286
|
</div>
|