doing 2.1.4pre → 2.1.5pre
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 +14 -13
- data/.yardoc/object_types +0 -0
- data/.yardoc/objects/root.dat +0 -0
- data/CHANGELOG.md +21 -0
- data/Gemfile.lock +3 -1
- data/README.md +1 -1
- data/bin/doing +149 -91
- data/doc/Array.html +63 -1
- data/doc/BooleanTermParser/Clause.html +293 -0
- data/doc/BooleanTermParser/Operator.html +172 -0
- data/doc/BooleanTermParser/Query.html +417 -0
- data/doc/BooleanTermParser/QueryParser.html +135 -0
- data/doc/BooleanTermParser/QueryTransformer.html +124 -0
- data/doc/BooleanTermParser.html +115 -0
- data/doc/Doing/CLIFormat.html +131 -0
- data/doc/Doing/Color.html +2 -2
- data/doc/Doing/Completion.html +1 -1
- data/doc/Doing/Configuration.html +116 -12
- 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 +100 -73
- data/doc/Doing/Items.html +2 -2
- data/doc/Doing/LogAdapter.html +70 -1
- data/doc/Doing/Note.html +5 -134
- data/doc/Doing/Pager.html +1 -1
- data/doc/Doing/Plugins.html +380 -40
- data/doc/Doing/Prompt.html +1 -1
- data/doc/Doing/Section.html +1 -1
- data/doc/Doing/TemplateString.html +713 -0
- data/doc/Doing/Util/Backup.html +686 -0
- data/doc/Doing/Util.html +1 -1
- data/doc/Doing/WWID.html +5 -5
- data/doc/Doing.html +4 -4
- 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 +1 -1
- data/doc/PhraseParser/Operator.html +172 -0
- data/doc/PhraseParser/PhraseClause.html +303 -0
- data/doc/PhraseParser/Query.html +495 -0
- data/doc/PhraseParser/QueryParser.html +136 -0
- data/doc/PhraseParser/QueryTransformer.html +124 -0
- data/doc/PhraseParser/TermClause.html +293 -0
- data/doc/PhraseParser.html +115 -0
- data/doc/Status.html +1 -1
- data/doc/String.html +182 -12
- data/doc/Symbol.html +35 -1
- data/doc/Time.html +1 -1
- data/doc/_index.html +21 -14
- data/doc/class_list.html +1 -1
- data/doc/file.README.html +2 -2
- data/doc/index.html +2 -2
- data/doc/method_list.html +319 -175
- data/doc/top-level-namespace.html +1 -1
- data/doing.gemspec +1 -0
- data/doing.rdoc +56 -9
- data/lib/doing/array.rb +9 -0
- data/lib/doing/configuration.rb +30 -8
- data/lib/doing/item.rb +12 -3
- data/lib/doing/log_adapter.rb +28 -0
- data/lib/doing/note.rb +31 -30
- data/lib/doing/plugin_manager.rb +57 -13
- data/lib/doing/plugins/export/dayone_export.rb +209 -0
- data/lib/doing/plugins/export/template_export.rb +90 -85
- data/lib/doing/prompt.rb +9 -6
- data/lib/doing/string.rb +68 -27
- data/lib/doing/symbol.rb +4 -0
- data/lib/doing/template_string.rb +197 -0
- data/lib/doing/util.rb +4 -2
- data/lib/doing/util_backup.rb +55 -3
- data/lib/doing/version.rb +1 -1
- data/lib/doing/wwid.rb +27 -18
- data/lib/doing.rb +3 -0
- data/lib/templates/doing-dayone-entry.erb +6 -0
- data/lib/templates/doing-dayone.erb +5 -0
- metadata +42 -2
|
@@ -0,0 +1,713 @@
|
|
|
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: Doing::TemplateString
|
|
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 = "Doing::TemplateString";
|
|
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 (T)</a> »
|
|
40
|
+
<span class='title'><span class='object_link'><a href="../Doing.html" title="Doing (module)">Doing</a></span></span>
|
|
41
|
+
»
|
|
42
|
+
<span class="title">TemplateString</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: Doing::TemplateString
|
|
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="../String.html" title="String (class)">String</a></span></span>
|
|
73
|
+
|
|
74
|
+
<ul class="fullTree">
|
|
75
|
+
<li>Object</li>
|
|
76
|
+
|
|
77
|
+
<li class="next"><span class='object_link'><a href="../String.html" title="String (class)">String</a></span></li>
|
|
78
|
+
|
|
79
|
+
<li class="next">Doing::TemplateString</li>
|
|
80
|
+
|
|
81
|
+
</ul>
|
|
82
|
+
<a href="#" class="inheritanceTree">show all</a>
|
|
83
|
+
|
|
84
|
+
</dd>
|
|
85
|
+
</dl>
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
<dl>
|
|
93
|
+
<dt>Includes:</dt>
|
|
94
|
+
<dd><span class='object_link'><a href="Color.html" title="Doing::Color (module)">Color</a></span></dd>
|
|
95
|
+
</dl>
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
|
|
100
|
+
|
|
101
|
+
|
|
102
|
+
<dl>
|
|
103
|
+
<dt>Defined in:</dt>
|
|
104
|
+
<dd>lib/doing/template_string.rb</dd>
|
|
105
|
+
</dl>
|
|
106
|
+
|
|
107
|
+
</div>
|
|
108
|
+
|
|
109
|
+
<h2>Overview</h2><div class="docstring">
|
|
110
|
+
<div class="discussion">
|
|
111
|
+
<p>Template string formatting</p>
|
|
112
|
+
|
|
113
|
+
|
|
114
|
+
</div>
|
|
115
|
+
</div>
|
|
116
|
+
<div class="tags">
|
|
117
|
+
|
|
118
|
+
|
|
119
|
+
</div>
|
|
120
|
+
|
|
121
|
+
|
|
122
|
+
<h2>Constant Summary</h2>
|
|
123
|
+
|
|
124
|
+
<h3 class="inherited">Constants included
|
|
125
|
+
from <span class='object_link'><a href="Color.html" title="Doing::Color (module)">Color</a></span></h3>
|
|
126
|
+
<p class="inherited"><span class='object_link'><a href="Color.html#ATTRIBUTES-constant" title="Doing::Color::ATTRIBUTES (constant)">Color::ATTRIBUTES</a></span>, <span class='object_link'><a href="Color.html#ATTRIBUTE_NAMES-constant" title="Doing::Color::ATTRIBUTE_NAMES (constant)">Color::ATTRIBUTE_NAMES</a></span>, <span class='object_link'><a href="Color.html#COLORED_REGEXP-constant" title="Doing::Color::COLORED_REGEXP (constant)">Color::COLORED_REGEXP</a></span></p>
|
|
127
|
+
|
|
128
|
+
|
|
129
|
+
<h2>Instance Attribute Summary <small><a href="#" class="summary_toggle">collapse</a></small></h2>
|
|
130
|
+
<ul class="summary">
|
|
131
|
+
|
|
132
|
+
<li class="public ">
|
|
133
|
+
<span class="summary_signature">
|
|
134
|
+
|
|
135
|
+
<a href="#original-instance_method" title="#original (instance method)">#<strong>original</strong> ⇒ Object </a>
|
|
136
|
+
|
|
137
|
+
|
|
138
|
+
|
|
139
|
+
</span>
|
|
140
|
+
|
|
141
|
+
|
|
142
|
+
|
|
143
|
+
|
|
144
|
+
<span class="note title readonly">readonly</span>
|
|
145
|
+
|
|
146
|
+
|
|
147
|
+
|
|
148
|
+
|
|
149
|
+
|
|
150
|
+
|
|
151
|
+
|
|
152
|
+
|
|
153
|
+
|
|
154
|
+
<span class="summary_desc"><div class='inline'><p>Returns the value of attribute original.</p>
|
|
155
|
+
</div></span>
|
|
156
|
+
|
|
157
|
+
</li>
|
|
158
|
+
|
|
159
|
+
|
|
160
|
+
</ul>
|
|
161
|
+
|
|
162
|
+
|
|
163
|
+
|
|
164
|
+
|
|
165
|
+
|
|
166
|
+
<h2>
|
|
167
|
+
Instance Method Summary
|
|
168
|
+
<small><a href="#" class="summary_toggle">collapse</a></small>
|
|
169
|
+
</h2>
|
|
170
|
+
|
|
171
|
+
<ul class="summary">
|
|
172
|
+
|
|
173
|
+
<li class="public ">
|
|
174
|
+
<span class="summary_signature">
|
|
175
|
+
|
|
176
|
+
<a href="#apply_colors-instance_method" title="#apply_colors (instance method)">#<strong>apply_colors</strong>(color_array) ⇒ Object </a>
|
|
177
|
+
|
|
178
|
+
|
|
179
|
+
|
|
180
|
+
</span>
|
|
181
|
+
|
|
182
|
+
|
|
183
|
+
|
|
184
|
+
|
|
185
|
+
|
|
186
|
+
|
|
187
|
+
|
|
188
|
+
|
|
189
|
+
|
|
190
|
+
<span class="summary_desc"><div class='inline'><p>Apply a color array to a string.</p>
|
|
191
|
+
</div></span>
|
|
192
|
+
|
|
193
|
+
</li>
|
|
194
|
+
|
|
195
|
+
|
|
196
|
+
<li class="public ">
|
|
197
|
+
<span class="summary_signature">
|
|
198
|
+
|
|
199
|
+
<a href="#colored-instance_method" title="#colored (instance method)">#<strong>colored</strong> ⇒ String </a>
|
|
200
|
+
|
|
201
|
+
|
|
202
|
+
|
|
203
|
+
</span>
|
|
204
|
+
|
|
205
|
+
|
|
206
|
+
|
|
207
|
+
|
|
208
|
+
|
|
209
|
+
|
|
210
|
+
|
|
211
|
+
|
|
212
|
+
|
|
213
|
+
<span class="summary_desc"><div class='inline'><p>Return string with %colors replaced with escape codes.</p>
|
|
214
|
+
</div></span>
|
|
215
|
+
|
|
216
|
+
</li>
|
|
217
|
+
|
|
218
|
+
|
|
219
|
+
<li class="public ">
|
|
220
|
+
<span class="summary_signature">
|
|
221
|
+
|
|
222
|
+
<a href="#colors%3F-instance_method" title="#colors? (instance method)">#<strong>colors?</strong> ⇒ Boolean </a>
|
|
223
|
+
|
|
224
|
+
|
|
225
|
+
|
|
226
|
+
</span>
|
|
227
|
+
|
|
228
|
+
|
|
229
|
+
|
|
230
|
+
|
|
231
|
+
|
|
232
|
+
|
|
233
|
+
|
|
234
|
+
|
|
235
|
+
|
|
236
|
+
<span class="summary_desc"><div class='inline'><p>Test if string contains any valid %colors.</p>
|
|
237
|
+
</div></span>
|
|
238
|
+
|
|
239
|
+
</li>
|
|
240
|
+
|
|
241
|
+
|
|
242
|
+
<li class="public ">
|
|
243
|
+
<span class="summary_signature">
|
|
244
|
+
|
|
245
|
+
<a href="#fill-instance_method" title="#fill (instance method)">#<strong>fill</strong>(placeholder, value, wrap_width: 0, color: '', tags_color: '', reset: '') ⇒ Object </a>
|
|
246
|
+
|
|
247
|
+
|
|
248
|
+
|
|
249
|
+
</span>
|
|
250
|
+
|
|
251
|
+
|
|
252
|
+
|
|
253
|
+
|
|
254
|
+
|
|
255
|
+
|
|
256
|
+
|
|
257
|
+
|
|
258
|
+
|
|
259
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
|
260
|
+
|
|
261
|
+
</li>
|
|
262
|
+
|
|
263
|
+
|
|
264
|
+
<li class="public ">
|
|
265
|
+
<span class="summary_signature">
|
|
266
|
+
|
|
267
|
+
<a href="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong>(string, placeholders: {}, force_color: false, wrap_width: 0, color: '', tags_color: '', reset: '') ⇒ TemplateString </a>
|
|
268
|
+
|
|
269
|
+
|
|
270
|
+
|
|
271
|
+
</span>
|
|
272
|
+
|
|
273
|
+
|
|
274
|
+
<span class="note title constructor">constructor</span>
|
|
275
|
+
|
|
276
|
+
|
|
277
|
+
|
|
278
|
+
|
|
279
|
+
|
|
280
|
+
|
|
281
|
+
|
|
282
|
+
|
|
283
|
+
<span class="summary_desc"><div class='inline'><p>A new instance of TemplateString.</p>
|
|
284
|
+
</div></span>
|
|
285
|
+
|
|
286
|
+
</li>
|
|
287
|
+
|
|
288
|
+
|
|
289
|
+
<li class="public ">
|
|
290
|
+
<span class="summary_signature">
|
|
291
|
+
|
|
292
|
+
<a href="#parse_colors-instance_method" title="#parse_colors (instance method)">#<strong>parse_colors</strong> ⇒ Hash </a>
|
|
293
|
+
|
|
294
|
+
|
|
295
|
+
|
|
296
|
+
</span>
|
|
297
|
+
|
|
298
|
+
|
|
299
|
+
|
|
300
|
+
|
|
301
|
+
|
|
302
|
+
|
|
303
|
+
|
|
304
|
+
|
|
305
|
+
|
|
306
|
+
<span class="summary_desc"><div class='inline'><p>Parse a template string for %colors and return a hash of colors and string locations.</p>
|
|
307
|
+
</div></span>
|
|
308
|
+
|
|
309
|
+
</li>
|
|
310
|
+
|
|
311
|
+
|
|
312
|
+
<li class="public ">
|
|
313
|
+
<span class="summary_signature">
|
|
314
|
+
|
|
315
|
+
<a href="#parsed_colors-instance_method" title="#parsed_colors (instance method)">#<strong>parsed_colors</strong> ⇒ Object </a>
|
|
316
|
+
|
|
317
|
+
|
|
318
|
+
|
|
319
|
+
</span>
|
|
320
|
+
|
|
321
|
+
|
|
322
|
+
|
|
323
|
+
|
|
324
|
+
|
|
325
|
+
|
|
326
|
+
|
|
327
|
+
|
|
328
|
+
|
|
329
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
|
330
|
+
|
|
331
|
+
</li>
|
|
332
|
+
|
|
333
|
+
|
|
334
|
+
<li class="public ">
|
|
335
|
+
<span class="summary_signature">
|
|
336
|
+
|
|
337
|
+
<a href="#raw-instance_method" title="#raw (instance method)">#<strong>raw</strong> ⇒ String </a>
|
|
338
|
+
|
|
339
|
+
|
|
340
|
+
|
|
341
|
+
</span>
|
|
342
|
+
|
|
343
|
+
|
|
344
|
+
|
|
345
|
+
|
|
346
|
+
|
|
347
|
+
|
|
348
|
+
|
|
349
|
+
|
|
350
|
+
|
|
351
|
+
<span class="summary_desc"><div class='inline'><p>Remove all valid %colors from string.</p>
|
|
352
|
+
</div></span>
|
|
353
|
+
|
|
354
|
+
</li>
|
|
355
|
+
|
|
356
|
+
|
|
357
|
+
<li class="public ">
|
|
358
|
+
<span class="summary_signature">
|
|
359
|
+
|
|
360
|
+
<a href="#reparse-instance_method" title="#reparse (instance method)">#<strong>reparse</strong> ⇒ Object </a>
|
|
361
|
+
|
|
362
|
+
|
|
363
|
+
|
|
364
|
+
</span>
|
|
365
|
+
|
|
366
|
+
|
|
367
|
+
|
|
368
|
+
|
|
369
|
+
|
|
370
|
+
|
|
371
|
+
|
|
372
|
+
|
|
373
|
+
|
|
374
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
|
375
|
+
|
|
376
|
+
</li>
|
|
377
|
+
|
|
378
|
+
|
|
379
|
+
</ul>
|
|
380
|
+
|
|
381
|
+
|
|
382
|
+
|
|
383
|
+
|
|
384
|
+
|
|
385
|
+
|
|
386
|
+
|
|
387
|
+
|
|
388
|
+
|
|
389
|
+
|
|
390
|
+
|
|
391
|
+
<h3 class="inherited">Methods included from <span class='object_link'><a href="Color.html" title="Doing::Color (module)">Color</a></span></h3>
|
|
392
|
+
<p class="inherited"><span class='object_link'><a href="Color.html#attributes-class_method" title="Doing::Color.attributes (method)">attributes</a></span>, <span class='object_link'><a href="Color.html#coloring%3F-class_method" title="Doing::Color.coloring? (method)">coloring?</a></span>, <span class='object_link'><a href="Color.html#support%3F-instance_method" title="Doing::Color#support? (method)">#support?</a></span>, <span class='object_link'><a href="Color.html#uncolor-instance_method" title="Doing::Color#uncolor (method)">#uncolor</a></span></p>
|
|
393
|
+
|
|
394
|
+
|
|
395
|
+
|
|
396
|
+
|
|
397
|
+
|
|
398
|
+
|
|
399
|
+
|
|
400
|
+
|
|
401
|
+
|
|
402
|
+
<h3 class="inherited">Methods inherited from <span class='object_link'><a href="../String.html" title="String (class)">String</a></span></h3>
|
|
403
|
+
<p class="inherited"><span class='object_link'><a href="../String.html#add_at-instance_method" title="String#add_at (method)">#add_at</a></span>, <span class='object_link'><a href="../String.html#add_tags-instance_method" title="String#add_tags (method)">#add_tags</a></span>, <span class='object_link'><a href="../String.html#add_tags!-instance_method" title="String#add_tags! (method)">#add_tags!</a></span>, <span class='object_link'><a href="../String.html#cap_first-instance_method" title="String#cap_first (method)">#cap_first</a></span>, <span class='object_link'><a href="../String.html#chronify-instance_method" title="String#chronify (method)">#chronify</a></span>, <span class='object_link'><a href="../String.html#chronify_qty-instance_method" title="String#chronify_qty (method)">#chronify_qty</a></span>, <span class='object_link'><a href="../String.html#clean_unlinked_urls-instance_method" title="String#clean_unlinked_urls (method)">#clean_unlinked_urls</a></span>, <span class='object_link'><a href="../String.html#compress-instance_method" title="String#compress (method)">#compress</a></span>, <span class='object_link'><a href="../String.html#compress!-instance_method" title="String#compress! (method)">#compress!</a></span>, <span class='object_link'><a href="../String.html#dedup_tags-instance_method" title="String#dedup_tags (method)">#dedup_tags</a></span>, <span class='object_link'><a href="../String.html#dedup_tags!-instance_method" title="String#dedup_tags! (method)">#dedup_tags!</a></span>, <span class='object_link'><a href="../String.html#highlight_tags-instance_method" title="String#highlight_tags (method)">#highlight_tags</a></span>, <span class='object_link'><a href="../String.html#highlight_tags!-instance_method" title="String#highlight_tags! (method)">#highlight_tags!</a></span>, <span class='object_link'><a href="../String.html#ignore%3F-instance_method" title="String#ignore? (method)">#ignore?</a></span>, <span class='object_link'><a href="../String.html#is_rx%3F-instance_method" title="String#is_rx? (method)">#is_rx?</a></span>, <span class='object_link'><a href="../String.html#last_color-instance_method" title="String#last_color (method)">#last_color</a></span>, <span class='object_link'><a href="../String.html#link_urls-instance_method" title="String#link_urls (method)">#link_urls</a></span>, <span class='object_link'><a href="../String.html#link_urls!-instance_method" title="String#link_urls! (method)">#link_urls!</a></span>, <span class='object_link'><a href="../String.html#normalize_bool-instance_method" title="String#normalize_bool (method)">#normalize_bool</a></span>, <span class='object_link'><a href="../String.html#normalize_bool!-instance_method" title="String#normalize_bool! (method)">#normalize_bool!</a></span>, <span class='object_link'><a href="../String.html#normalize_case-instance_method" title="String#normalize_case (method)">#normalize_case</a></span>, <span class='object_link'><a href="../String.html#normalize_case!-instance_method" title="String#normalize_case! (method)">#normalize_case!</a></span>, <span class='object_link'><a href="../String.html#normalize_matching-instance_method" title="String#normalize_matching (method)">#normalize_matching</a></span>, <span class='object_link'><a href="../String.html#normalize_matching!-instance_method" title="String#normalize_matching! (method)">#normalize_matching!</a></span>, <span class='object_link'><a href="../String.html#normalize_order-instance_method" title="String#normalize_order (method)">#normalize_order</a></span>, <span class='object_link'><a href="../String.html#normalize_order!-instance_method" title="String#normalize_order! (method)">#normalize_order!</a></span>, <span class='object_link'><a href="../String.html#normalize_trigger-instance_method" title="String#normalize_trigger (method)">#normalize_trigger</a></span>, <span class='object_link'><a href="../String.html#normalize_trigger!-instance_method" title="String#normalize_trigger! (method)">#normalize_trigger!</a></span>, <span class='object_link'><a href="../String.html#pluralize-instance_method" title="String#pluralize (method)">#pluralize</a></span>, <span class='object_link'><a href="../String.html#remove_self_links-instance_method" title="String#remove_self_links (method)">#remove_self_links</a></span>, <span class='object_link'><a href="../String.html#replace_qualified_urls-instance_method" title="String#replace_qualified_urls (method)">#replace_qualified_urls</a></span>, <span class='object_link'><a href="../String.html#set_type-instance_method" title="String#set_type (method)">#set_type</a></span>, <span class='object_link'><a href="../String.html#simple_wrap-instance_method" title="String#simple_wrap (method)">#simple_wrap</a></span>, <span class='object_link'><a href="../String.html#tag-instance_method" title="String#tag (method)">#tag</a></span>, <span class='object_link'><a href="../String.html#tag!-instance_method" title="String#tag! (method)">#tag!</a></span>, <span class='object_link'><a href="../String.html#to_rx-instance_method" title="String#to_rx (method)">#to_rx</a></span>, <span class='object_link'><a href="../String.html#to_tags-instance_method" title="String#to_tags (method)">#to_tags</a></span>, <span class='object_link'><a href="../String.html#truncate-instance_method" title="String#truncate (method)">#truncate</a></span>, <span class='object_link'><a href="../String.html#truncate!-instance_method" title="String#truncate! (method)">#truncate!</a></span>, <span class='object_link'><a href="../String.html#truncmiddle-instance_method" title="String#truncmiddle (method)">#truncmiddle</a></span>, <span class='object_link'><a href="../String.html#truncmiddle!-instance_method" title="String#truncmiddle! (method)">#truncmiddle!</a></span>, <span class='object_link'><a href="../String.html#truthy%3F-instance_method" title="String#truthy? (method)">#truthy?</a></span>, <span class='object_link'><a href="../String.html#uncolor-instance_method" title="String#uncolor (method)">#uncolor</a></span>, <span class='object_link'><a href="../String.html#uncolor!-instance_method" title="String#uncolor! (method)">#uncolor!</a></span>, <span class='object_link'><a href="../String.html#validate_color-instance_method" title="String#validate_color (method)">#validate_color</a></span>, <span class='object_link'><a href="../String.html#wildcard_to_rx-instance_method" title="String#wildcard_to_rx (method)">#wildcard_to_rx</a></span>, <span class='object_link'><a href="../String.html#wrap-instance_method" title="String#wrap (method)">#wrap</a></span></p>
|
|
404
|
+
<div id="constructor_details" class="method_details_list">
|
|
405
|
+
<h2>Constructor Details</h2>
|
|
406
|
+
|
|
407
|
+
<div class="method_details first">
|
|
408
|
+
<h3 class="signature first" id="initialize-instance_method">
|
|
409
|
+
|
|
410
|
+
#<strong>initialize</strong>(string, placeholders: {}, force_color: false, wrap_width: 0, color: '', tags_color: '', reset: '') ⇒ <tt><span class='object_link'><a href="" title="Doing::TemplateString (class)">TemplateString</a></span></tt>
|
|
411
|
+
|
|
412
|
+
|
|
413
|
+
|
|
414
|
+
|
|
415
|
+
|
|
416
|
+
</h3><div class="docstring">
|
|
417
|
+
<div class="discussion">
|
|
418
|
+
<p>Returns a new instance of TemplateString.</p>
|
|
419
|
+
|
|
420
|
+
|
|
421
|
+
</div>
|
|
422
|
+
</div>
|
|
423
|
+
<div class="tags">
|
|
424
|
+
|
|
425
|
+
|
|
426
|
+
</div>
|
|
427
|
+
</div>
|
|
428
|
+
|
|
429
|
+
</div>
|
|
430
|
+
|
|
431
|
+
<div id="instance_attr_details" class="attr_details">
|
|
432
|
+
<h2>Instance Attribute Details</h2>
|
|
433
|
+
|
|
434
|
+
|
|
435
|
+
<span id=""></span>
|
|
436
|
+
<div class="method_details first">
|
|
437
|
+
<h3 class="signature first" id="original-instance_method">
|
|
438
|
+
|
|
439
|
+
#<strong>original</strong> ⇒ <tt>Object</tt> <span class="extras">(readonly)</span>
|
|
440
|
+
|
|
441
|
+
|
|
442
|
+
|
|
443
|
+
|
|
444
|
+
|
|
445
|
+
</h3><div class="docstring">
|
|
446
|
+
<div class="discussion">
|
|
447
|
+
<p>Returns the value of attribute original.</p>
|
|
448
|
+
|
|
449
|
+
|
|
450
|
+
</div>
|
|
451
|
+
</div>
|
|
452
|
+
<div class="tags">
|
|
453
|
+
|
|
454
|
+
|
|
455
|
+
</div>
|
|
456
|
+
</div>
|
|
457
|
+
|
|
458
|
+
</div>
|
|
459
|
+
|
|
460
|
+
|
|
461
|
+
<div id="instance_method_details" class="method_details_list">
|
|
462
|
+
<h2>Instance Method Details</h2>
|
|
463
|
+
|
|
464
|
+
|
|
465
|
+
<div class="method_details first">
|
|
466
|
+
<h3 class="signature first" id="apply_colors-instance_method">
|
|
467
|
+
|
|
468
|
+
#<strong>apply_colors</strong>(color_array) ⇒ <tt>Object</tt>
|
|
469
|
+
|
|
470
|
+
|
|
471
|
+
|
|
472
|
+
|
|
473
|
+
|
|
474
|
+
</h3><div class="docstring">
|
|
475
|
+
<div class="discussion">
|
|
476
|
+
<p>Apply a color array to a string</p>
|
|
477
|
+
|
|
478
|
+
|
|
479
|
+
</div>
|
|
480
|
+
</div>
|
|
481
|
+
<div class="tags">
|
|
482
|
+
<p class="tag_title">Parameters:</p>
|
|
483
|
+
<ul class="param">
|
|
484
|
+
|
|
485
|
+
<li>
|
|
486
|
+
|
|
487
|
+
<span class='name'>color_array</span>
|
|
488
|
+
|
|
489
|
+
|
|
490
|
+
<span class='type'>(<tt><span class='object_link'><a href="../Array.html" title="Array (class)">Array</a></span></tt>)</span>
|
|
491
|
+
|
|
492
|
+
|
|
493
|
+
|
|
494
|
+
—
|
|
495
|
+
<div class='inline'><p>Array of hashes
|
|
496
|
+
containing :name, :color,
|
|
497
|
+
:index</p>
|
|
498
|
+
</div>
|
|
499
|
+
|
|
500
|
+
</li>
|
|
501
|
+
|
|
502
|
+
</ul>
|
|
503
|
+
|
|
504
|
+
|
|
505
|
+
</div>
|
|
506
|
+
</div>
|
|
507
|
+
|
|
508
|
+
<div class="method_details ">
|
|
509
|
+
<h3 class="signature " id="colored-instance_method">
|
|
510
|
+
|
|
511
|
+
#<strong>colored</strong> ⇒ <tt><span class='object_link'><a href="../String.html" title="String (class)">String</a></span></tt>
|
|
512
|
+
|
|
513
|
+
|
|
514
|
+
|
|
515
|
+
|
|
516
|
+
|
|
517
|
+
</h3><div class="docstring">
|
|
518
|
+
<div class="discussion">
|
|
519
|
+
<p>Return string with %colors replaced with escape codes</p>
|
|
520
|
+
|
|
521
|
+
|
|
522
|
+
</div>
|
|
523
|
+
</div>
|
|
524
|
+
<div class="tags">
|
|
525
|
+
|
|
526
|
+
<p class="tag_title">Returns:</p>
|
|
527
|
+
<ul class="return">
|
|
528
|
+
|
|
529
|
+
<li>
|
|
530
|
+
|
|
531
|
+
|
|
532
|
+
<span class='type'>(<tt><span class='object_link'><a href="../String.html" title="String (class)">String</a></span></tt>)</span>
|
|
533
|
+
|
|
534
|
+
|
|
535
|
+
|
|
536
|
+
—
|
|
537
|
+
<div class='inline'><p>colorized string</p>
|
|
538
|
+
</div>
|
|
539
|
+
|
|
540
|
+
</li>
|
|
541
|
+
|
|
542
|
+
</ul>
|
|
543
|
+
|
|
544
|
+
</div>
|
|
545
|
+
</div>
|
|
546
|
+
|
|
547
|
+
<div class="method_details ">
|
|
548
|
+
<h3 class="signature " id="colors?-instance_method">
|
|
549
|
+
|
|
550
|
+
#<strong>colors?</strong> ⇒ <tt>Boolean</tt>
|
|
551
|
+
|
|
552
|
+
|
|
553
|
+
|
|
554
|
+
|
|
555
|
+
|
|
556
|
+
</h3><div class="docstring">
|
|
557
|
+
<div class="discussion">
|
|
558
|
+
<p>Test if string contains any valid %colors</p>
|
|
559
|
+
|
|
560
|
+
|
|
561
|
+
</div>
|
|
562
|
+
</div>
|
|
563
|
+
<div class="tags">
|
|
564
|
+
|
|
565
|
+
<p class="tag_title">Returns:</p>
|
|
566
|
+
<ul class="return">
|
|
567
|
+
|
|
568
|
+
<li>
|
|
569
|
+
|
|
570
|
+
|
|
571
|
+
<span class='type'>(<tt>Boolean</tt>)</span>
|
|
572
|
+
|
|
573
|
+
|
|
574
|
+
|
|
575
|
+
—
|
|
576
|
+
<div class='inline'><p>True if colors, False otherwise.</p>
|
|
577
|
+
</div>
|
|
578
|
+
|
|
579
|
+
</li>
|
|
580
|
+
|
|
581
|
+
</ul>
|
|
582
|
+
|
|
583
|
+
</div>
|
|
584
|
+
</div>
|
|
585
|
+
|
|
586
|
+
<div class="method_details ">
|
|
587
|
+
<h3 class="signature " id="fill-instance_method">
|
|
588
|
+
|
|
589
|
+
#<strong>fill</strong>(placeholder, value, wrap_width: 0, color: '', tags_color: '', reset: '') ⇒ <tt>Object</tt>
|
|
590
|
+
|
|
591
|
+
|
|
592
|
+
|
|
593
|
+
|
|
594
|
+
|
|
595
|
+
</h3>
|
|
596
|
+
</div>
|
|
597
|
+
|
|
598
|
+
<div class="method_details ">
|
|
599
|
+
<h3 class="signature " id="parse_colors-instance_method">
|
|
600
|
+
|
|
601
|
+
#<strong>parse_colors</strong> ⇒ <tt><span class='object_link'><a href="../Hash.html" title="Hash (class)">Hash</a></span></tt>
|
|
602
|
+
|
|
603
|
+
|
|
604
|
+
|
|
605
|
+
|
|
606
|
+
|
|
607
|
+
</h3><div class="docstring">
|
|
608
|
+
<div class="discussion">
|
|
609
|
+
<p>Parse a template string for %colors and return a hash
|
|
610
|
+
of colors and string locations</p>
|
|
611
|
+
|
|
612
|
+
|
|
613
|
+
</div>
|
|
614
|
+
</div>
|
|
615
|
+
<div class="tags">
|
|
616
|
+
|
|
617
|
+
<p class="tag_title">Returns:</p>
|
|
618
|
+
<ul class="return">
|
|
619
|
+
|
|
620
|
+
<li>
|
|
621
|
+
|
|
622
|
+
|
|
623
|
+
<span class='type'>(<tt><span class='object_link'><a href="../Hash.html" title="Hash (class)">Hash</a></span></tt>)</span>
|
|
624
|
+
|
|
625
|
+
|
|
626
|
+
|
|
627
|
+
—
|
|
628
|
+
<div class='inline'><p>Uncolored string and array of colors and locations</p>
|
|
629
|
+
</div>
|
|
630
|
+
|
|
631
|
+
</li>
|
|
632
|
+
|
|
633
|
+
</ul>
|
|
634
|
+
|
|
635
|
+
</div>
|
|
636
|
+
</div>
|
|
637
|
+
|
|
638
|
+
<div class="method_details ">
|
|
639
|
+
<h3 class="signature " id="parsed_colors-instance_method">
|
|
640
|
+
|
|
641
|
+
#<strong>parsed_colors</strong> ⇒ <tt>Object</tt>
|
|
642
|
+
|
|
643
|
+
|
|
644
|
+
|
|
645
|
+
|
|
646
|
+
|
|
647
|
+
</h3>
|
|
648
|
+
</div>
|
|
649
|
+
|
|
650
|
+
<div class="method_details ">
|
|
651
|
+
<h3 class="signature " id="raw-instance_method">
|
|
652
|
+
|
|
653
|
+
#<strong>raw</strong> ⇒ <tt><span class='object_link'><a href="../String.html" title="String (class)">String</a></span></tt>
|
|
654
|
+
|
|
655
|
+
|
|
656
|
+
|
|
657
|
+
|
|
658
|
+
|
|
659
|
+
</h3><div class="docstring">
|
|
660
|
+
<div class="discussion">
|
|
661
|
+
<p>Remove all valid %colors from string</p>
|
|
662
|
+
|
|
663
|
+
|
|
664
|
+
</div>
|
|
665
|
+
</div>
|
|
666
|
+
<div class="tags">
|
|
667
|
+
|
|
668
|
+
<p class="tag_title">Returns:</p>
|
|
669
|
+
<ul class="return">
|
|
670
|
+
|
|
671
|
+
<li>
|
|
672
|
+
|
|
673
|
+
|
|
674
|
+
<span class='type'>(<tt><span class='object_link'><a href="../String.html" title="String (class)">String</a></span></tt>)</span>
|
|
675
|
+
|
|
676
|
+
|
|
677
|
+
|
|
678
|
+
—
|
|
679
|
+
<div class='inline'><p>cleaned string</p>
|
|
680
|
+
</div>
|
|
681
|
+
|
|
682
|
+
</li>
|
|
683
|
+
|
|
684
|
+
</ul>
|
|
685
|
+
|
|
686
|
+
</div>
|
|
687
|
+
</div>
|
|
688
|
+
|
|
689
|
+
<div class="method_details ">
|
|
690
|
+
<h3 class="signature " id="reparse-instance_method">
|
|
691
|
+
|
|
692
|
+
#<strong>reparse</strong> ⇒ <tt>Object</tt>
|
|
693
|
+
|
|
694
|
+
|
|
695
|
+
|
|
696
|
+
|
|
697
|
+
|
|
698
|
+
</h3>
|
|
699
|
+
</div>
|
|
700
|
+
|
|
701
|
+
</div>
|
|
702
|
+
|
|
703
|
+
</div>
|
|
704
|
+
|
|
705
|
+
<div id="footer">
|
|
706
|
+
Generated on Sun Dec 19 12:35:33 2021 by
|
|
707
|
+
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
708
|
+
0.9.26 (ruby-3.0.1).
|
|
709
|
+
</div>
|
|
710
|
+
|
|
711
|
+
</div>
|
|
712
|
+
</body>
|
|
713
|
+
</html>
|