fto 0.1.0 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- data/Changelog.txt +20 -0
- data/NOTICE.txt +5 -0
- data/doc/classes/FormatText/Context.html +17 -8
- data/doc/classes/FormatText/Context.src/M000008.html +1 -1
- data/doc/classes/FormatText/Context.src/M000009.html +2 -2
- data/doc/classes/FormatText/Effector.html +73 -32
- data/doc/classes/FormatText/Effector.src/M000009.html +1 -1
- data/doc/classes/FormatText/Effector.src/M000010.html +29 -5
- data/doc/classes/FormatText/Effector.src/M000011.html +5 -4
- data/doc/classes/FormatText/Effector.src/M000012.html +4 -5
- data/doc/classes/FormatText/Effector.src/M000013.html +5 -4
- data/doc/classes/FormatText/Effector.src/M000014.html +1 -1
- data/doc/classes/FormatText/FTO.html +75 -38
- data/doc/classes/FormatText/FTO.src/M000001.html +2 -1
- data/doc/classes/FormatText/FTO.src/M000002.html +4 -18
- data/doc/classes/FormatText/FTO.src/M000003.html +18 -6
- data/doc/classes/FormatText/FTO.src/M000004.html +7 -4
- data/doc/classes/FormatText/FTO.src/M000005.html +5 -8
- data/doc/classes/FormatText/FTO.src/M000006.html +8 -6
- data/doc/classes/FormatText/FTO.src/M000007.html +6 -49
- data/doc/classes/FormatText/FTO.src/M000008.html +17 -9
- data/doc/created.rid +1 -1
- data/doc/files/lib/fto_rb.html +1 -1
- data/doc/fr_method_index.html +13 -12
- data/lib/fto.rb +385 -135
- data/test/test_fto_api.rb +43 -19
- data/test/test_fto_effectors.rb +25 -0
- metadata +4 -2
data/Changelog.txt
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
-*- mode: change-log; mode: auto-fill; -*-
|
2
|
+
|
3
|
+
1.0.0 2009-12-07
|
4
|
+
* Added !%T( ... !) effector, which does both date and time and is
|
5
|
+
significantly different from OpenVMS' meaning for !%T and !%D.
|
6
|
+
Oh, well.
|
7
|
+
* Added FTO.clearEffectorList() for easy replacement of the
|
8
|
+
standard effectors with a custom set.
|
9
|
+
* Made effector processing safe (i.e., the output of one effector
|
10
|
+
can't affect the format string seen by subsequent effectors).
|
11
|
+
* Fix a problem with string field width calculation when none was
|
12
|
+
specified.
|
13
|
+
* Freeze the class variables when they're rebuilt.
|
14
|
+
|
15
|
+
0.1.0 2009-12-03 Initial gem released
|
16
|
+
--------------------------
|
17
|
+
Not a complete implementation of OpenVMS' SYS$FAO system service
|
18
|
+
syntax, but probably about 95% of the useful stuff. (Much of
|
19
|
+
SYS$FAO's functionality is specific to the OpenVMS operating
|
20
|
+
system.) The extensibility of FTO is a completely new feature.
|
data/NOTICE.txt
ADDED
@@ -100,7 +100,7 @@ really intended for external consumption.
|
|
100
100
|
<h3 class="section-bar">Methods</h3>
|
101
101
|
|
102
102
|
<div class="name-list">
|
103
|
-
<a href="#
|
103
|
+
<a href="#M000009">new</a>
|
104
104
|
</div>
|
105
105
|
</div>
|
106
106
|
|
@@ -134,7 +134,7 @@ intended to modify the list of arguments being used to build the final
|
|
134
134
|
string. The <em>argList</em> attribute should be modified in conjunction
|
135
135
|
with <em>usedArgs</em> to maintain continuity. By default, after the
|
136
136
|
effector function returns, the caller (the <em><a
|
137
|
-
href="FTO.html#
|
137
|
+
href="FTO.html#M000008">FTO#format</a>()</em> method) will take the element
|
138
138
|
from the front of the <em>argList</em> array and push it onto the end of
|
139
139
|
the <em>usedArgs</em> array.
|
140
140
|
</p>
|
@@ -156,6 +156,15 @@ the <em>usedArgs</em> array.
|
|
156
156
|
<em><a href="FTO.html">FTO</a> object</em>. The <em><a
|
157
157
|
href="FTO.html">FTO</a></em> object being processed. Read-only.
|
158
158
|
|
159
|
+
</td>
|
160
|
+
</tr>
|
161
|
+
<tr class="top-aligned-row context-row">
|
162
|
+
<td class="context-item-name">lastArgUsed</td>
|
163
|
+
<td class="context-item-value"> [RW] </td>
|
164
|
+
<td class="context-item-desc">
|
165
|
+
<em>Any</em>. The <em><a href="FTO.html#M000008">FTO#format</a>()</em> sets
|
166
|
+
this to the last argument that was actually used.
|
167
|
+
|
159
168
|
</td>
|
160
169
|
</tr>
|
161
170
|
<tr class="top-aligned-row context-row">
|
@@ -163,7 +172,7 @@ href="FTO.html">FTO</a></em> object being processed. Read-only.
|
|
163
172
|
<td class="context-item-value"> [RW] </td>
|
164
173
|
<td class="context-item-desc">
|
165
174
|
<em>Boolean</em>. The effector function sets this to <tt>true</tt> to
|
166
|
-
inhibit the <em><a href="FTO.html#
|
175
|
+
inhibit the <em><a href="FTO.html#M000008">FTO#format</a>()</em> method
|
167
176
|
from modifying the argument list after the function returns. See the
|
168
177
|
descriptions under the <em>argList</em> and <em>usedArgs</em> attributes.
|
169
178
|
|
@@ -197,12 +206,12 @@ see the description of the <em>usedArgs</em> attribute for exceptions.
|
|
197
206
|
<div id="methods">
|
198
207
|
<h3 class="section-bar">Public Class methods</h3>
|
199
208
|
|
200
|
-
<div id="method-
|
201
|
-
<a name="
|
209
|
+
<div id="method-M000009" class="method-detail">
|
210
|
+
<a name="M000009"></a>
|
202
211
|
|
203
212
|
<div class="method-heading">
|
204
|
-
<a href="Context.src/
|
205
|
-
onclick="popupCode('Context.src/
|
213
|
+
<a href="Context.src/M000009.html" target="Code" class="method-signature"
|
214
|
+
onclick="popupCode('Context.src/M000009.html');return false;">
|
206
215
|
<span class="method-name">new<i>(Hash)</i> => <i>FormatText::Context object</i><br />
|
207
216
|
</span>
|
208
217
|
</a>
|
@@ -210,7 +219,7 @@ see the description of the <em>usedArgs</em> attribute for exceptions.
|
|
210
219
|
|
211
220
|
<div class="method-description">
|
212
221
|
<p>
|
213
|
-
Create a <a href="Context.html#
|
222
|
+
Create a <a href="Context.html#M000009">new</a> <em><a
|
214
223
|
href="Context.html">FormatText::Context</a></em> object. There may only be
|
215
224
|
a single argument to the constructor, and it must be a hash, using symbols
|
216
225
|
for the names of the attributes to set:
|
@@ -10,7 +10,7 @@
|
|
10
10
|
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
11
11
|
</head>
|
12
12
|
<body class="standalone-code">
|
13
|
-
<pre><span class="ruby-comment cmt"># File lib/fto.rb, line
|
13
|
+
<pre><span class="ruby-comment cmt"># File lib/fto.rb, line 187</span>
|
14
14
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">argsp</span>)
|
15
15
|
(<span class="ruby-ivar">@effectorObj</span>, <span class="ruby-ivar">@ftoObj</span>) = <span class="ruby-keyword kw">nil</span>
|
16
16
|
<span class="ruby-ivar">@sMatched</span> = <span class="ruby-value str">''</span>
|
@@ -10,7 +10,7 @@
|
|
10
10
|
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
11
11
|
</head>
|
12
12
|
<body class="standalone-code">
|
13
|
-
<pre><span class="ruby-comment cmt"># File lib/fto.rb, line
|
13
|
+
<pre><span class="ruby-comment cmt"># File lib/fto.rb, line 186</span>
|
14
14
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">argsp</span>)
|
15
15
|
(<span class="ruby-ivar">@effectorObj</span>, <span class="ruby-ivar">@ftoObj</span>) = <span class="ruby-keyword kw">nil</span>
|
16
16
|
<span class="ruby-ivar">@sMatched</span> = <span class="ruby-value str">''</span>
|
@@ -18,7 +18,7 @@
|
|
18
18
|
<span class="ruby-ivar">@argList</span> = []
|
19
19
|
<span class="ruby-ivar">@reuseArg</span> = <span class="ruby-keyword kw">false</span>
|
20
20
|
<span class="ruby-keyword kw">if</span> (<span class="ruby-identifier">argsp</span>[<span class="ruby-value">0</span>].<span class="ruby-identifier">class</span> <span class="ruby-operator">!=</span> <span class="ruby-constant">Hash</span>)
|
21
|
-
<span class="ruby-identifier">raise</span> <span class="ruby-constant">RuntimeError</span>, <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">class</span>.<span class="ruby-identifier">name</span> <span class="ruby-operator">+</span> <span class="ruby-value str">' requires a Hash to create'</span>
|
21
|
+
<span class="ruby-identifier">raise</span> <span class="ruby-constant">RuntimeError</span>, <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">class</span>.<span class="ruby-identifier">name</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">_</span>(<span class="ruby-value str">' requires a Hash to create'</span>)
|
22
22
|
<span class="ruby-keyword kw">end</span>
|
23
23
|
<span class="ruby-identifier">argsp</span>[<span class="ruby-value">0</span>].<span class="ruby-identifier">each</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">key</span>,<span class="ruby-identifier">val</span><span class="ruby-operator">|</span> <span class="ruby-identifier">eval</span>(<span class="ruby-node">"self.#{key.to_s} = val"</span>) }
|
24
24
|
<span class="ruby-keyword kw">end</span></pre>
|
@@ -88,7 +88,7 @@ effector operates and what it needs.
|
|
88
88
|
<p>
|
89
89
|
Typically <em><a href="Effector.html">FormatText::Effector</a></em> objects
|
90
90
|
aren‘t created directly, but by calling <em><a
|
91
|
-
href="FTO.html#
|
91
|
+
href="FTO.html#M000003">FTO.registerEffector</a>()</em>.
|
92
92
|
</p>
|
93
93
|
|
94
94
|
</div>
|
@@ -100,11 +100,11 @@ href="FTO.html#M000002">FTO.registerEffector</a>()</em>.
|
|
100
100
|
<h3 class="section-bar">Methods</h3>
|
101
101
|
|
102
102
|
<div class="name-list">
|
103
|
-
<a href="#
|
104
|
-
<a href="#
|
105
|
-
<a href="#
|
106
|
-
<a href="#
|
107
|
-
<a href="#
|
103
|
+
<a href="#M000011">disable</a>
|
104
|
+
<a href="#M000012">disabled?</a>
|
105
|
+
<a href="#M000013">enable</a>
|
106
|
+
<a href="#M000014">enabled?</a>
|
107
|
+
<a href="#M000010">new</a>
|
108
108
|
</div>
|
109
109
|
</div>
|
110
110
|
|
@@ -124,6 +124,16 @@ href="FTO.html#M000002">FTO.registerEffector</a>()</em>.
|
|
124
124
|
|
125
125
|
<div class="name-list">
|
126
126
|
<table>
|
127
|
+
<tr class="top-aligned-row context-row">
|
128
|
+
<td class="context-item-name">category</td>
|
129
|
+
<td class="context-item-value"> [RW] </td>
|
130
|
+
<td class="context-item-desc">
|
131
|
+
<em>String</em>. Phrase for grouping with related effectors in
|
132
|
+
documentation (like ‘String Insertion’ or ‘Numeric
|
133
|
+
Conversion’).
|
134
|
+
|
135
|
+
</td>
|
136
|
+
</tr>
|
127
137
|
<tr class="top-aligned-row context-row">
|
128
138
|
<td class="context-item-name">code</td>
|
129
139
|
<td class="context-item-value"> [RW] </td>
|
@@ -147,8 +157,31 @@ or the various <tt>Convert</tt> constants in the source.)
|
|
147
157
|
<td class="context-item-name">dWidth</td>
|
148
158
|
<td class="context-item-value"> [RW] </td>
|
149
159
|
<td class="context-item-desc">
|
150
|
-
<em>
|
160
|
+
<em>Various</em>. Default width for the effector result (used for
|
161
|
+
documentation and when filling). Possible values:
|
162
|
+
|
163
|
+
<dl>
|
164
|
+
<dt><em>Integer</em></dt><dd>Specified number of columns.
|
151
165
|
|
166
|
+
</dd>
|
167
|
+
<dt><em>String</em></dt><dd>The string is used in the documentation <em>verbatim</em>.
|
168
|
+
|
169
|
+
</dd>
|
170
|
+
<dt><tt>:NA</tt></dt><dd>Default width not applicable to this effector.
|
171
|
+
|
172
|
+
</dd>
|
173
|
+
<dt><tt>:asNeeded</tt></dt><dd>As many columns as are needed to represent the value.
|
174
|
+
|
175
|
+
</dd>
|
176
|
+
<dt><tt>:asSpecified</tt></dt><dd>As specified in the effector.
|
177
|
+
|
178
|
+
</dd>
|
179
|
+
</dl>
|
180
|
+
<p>
|
181
|
+
This should be set to an integer value if needed by the effector function.
|
182
|
+
All of the other possible values shown above are used in generating
|
183
|
+
documentation.
|
184
|
+
</p>
|
152
185
|
</td>
|
153
186
|
</tr>
|
154
187
|
<tr class="top-aligned-row context-row">
|
@@ -191,9 +224,9 @@ widths.
|
|
191
224
|
<td class="context-item-desc">
|
192
225
|
<em>Fixnum</em>. ID number assigned to the effector, unique within a usage
|
193
226
|
environment. Used by <em><a
|
194
|
-
href="FTO.html#
|
195
|
-
href="FTO.html#
|
196
|
-
href="FTO.html#
|
227
|
+
href="FTO.html#M000004">FTO.enableEffector</a>()</em>, <em><a
|
228
|
+
href="FTO.html#M000006">FTO.disableEffector</a>()</em>, and <em><a
|
229
|
+
href="FTO.html#M000005">FTO.destroyEffector</a>()</em>.
|
197
230
|
|
198
231
|
</td>
|
199
232
|
</tr>
|
@@ -270,6 +303,14 @@ byte, <tt>:mask</tt> would be <tt>0xFF</tt> and <tt>:signbit</tt> would be
|
|
270
303
|
<em>String</em>. Key used to sort effectors, built from the name and
|
271
304
|
priority.
|
272
305
|
|
306
|
+
</td>
|
307
|
+
</tr>
|
308
|
+
<tr class="top-aligned-row context-row">
|
309
|
+
<td class="context-item-name">syntax</td>
|
310
|
+
<td class="context-item-value"> [RW] </td>
|
311
|
+
<td class="context-item-desc">
|
312
|
+
<em>String</em>. Human-readable syntax (HTML okey).
|
313
|
+
|
273
314
|
</td>
|
274
315
|
</tr>
|
275
316
|
<tr class="top-aligned-row context-row">
|
@@ -292,12 +333,12 @@ width.
|
|
292
333
|
<div id="methods">
|
293
334
|
<h3 class="section-bar">Public Class methods</h3>
|
294
335
|
|
295
|
-
<div id="method-
|
296
|
-
<a name="
|
336
|
+
<div id="method-M000010" class="method-detail">
|
337
|
+
<a name="M000010"></a>
|
297
338
|
|
298
339
|
<div class="method-heading">
|
299
|
-
<a href="Effector.src/
|
300
|
-
onclick="popupCode('Effector.src/
|
340
|
+
<a href="Effector.src/M000010.html" target="Code" class="method-signature"
|
341
|
+
onclick="popupCode('Effector.src/M000010.html');return false;">
|
301
342
|
<span class="method-name">new<i>(Hash)</i> => <i>FormatText::Effector object</i><br />
|
302
343
|
new<i>(name, description, enabled, priority, code, reMatch, reExtra, mask, signbit, dWidth, fill, justify, truncate, data)</i> => <i>FormatText::Effector object</i><br />
|
303
344
|
</span>
|
@@ -306,7 +347,7 @@ new<i>(name, description, enabled, priority, code, reMatch, reExtra, mask, signb
|
|
306
347
|
|
307
348
|
<div class="method-description">
|
308
349
|
<p>
|
309
|
-
Creates a <a href="Effector.html#
|
350
|
+
Creates a <a href="Effector.html#M000010">new</a> <em><a
|
310
351
|
href="Effector.html">FormatText::Effector</a></em> object. The argument
|
311
352
|
list can be either an order-dependent list of attribute values, or a hash
|
312
353
|
using the symbolised attribute names as the keys.
|
@@ -316,12 +357,12 @@ using the symbolised attribute names as the keys.
|
|
316
357
|
|
317
358
|
<h3 class="section-bar">Public Instance methods</h3>
|
318
359
|
|
319
|
-
<div id="method-
|
320
|
-
<a name="
|
360
|
+
<div id="method-M000011" class="method-detail">
|
361
|
+
<a name="M000011"></a>
|
321
362
|
|
322
363
|
<div class="method-heading">
|
323
|
-
<a href="Effector.src/
|
324
|
-
onclick="popupCode('Effector.src/
|
364
|
+
<a href="Effector.src/M000011.html" target="Code" class="method-signature"
|
365
|
+
onclick="popupCode('Effector.src/M000011.html');return false;">
|
325
366
|
<span class="method-name">disable<i>()</i> => <i>nil</i><br />
|
326
367
|
</span>
|
327
368
|
</a>
|
@@ -331,18 +372,18 @@ using the symbolised attribute names as the keys.
|
|
331
372
|
<p>
|
332
373
|
Disables the effector, removing it from consideration when the format
|
333
374
|
string is being scanned. It can be subsequently re-enabled with the <em><a
|
334
|
-
href="Effector.html#
|
375
|
+
href="Effector.html#M000013">Effector#enable</a>()</em> method. This is a
|
335
376
|
no-op if the effector is already disabled.
|
336
377
|
</p>
|
337
378
|
</div>
|
338
379
|
</div>
|
339
380
|
|
340
|
-
<div id="method-
|
341
|
-
<a name="
|
381
|
+
<div id="method-M000012" class="method-detail">
|
382
|
+
<a name="M000012"></a>
|
342
383
|
|
343
384
|
<div class="method-heading">
|
344
|
-
<a href="Effector.src/
|
345
|
-
onclick="popupCode('Effector.src/
|
385
|
+
<a href="Effector.src/M000012.html" target="Code" class="method-signature"
|
386
|
+
onclick="popupCode('Effector.src/M000012.html');return false;">
|
346
387
|
<span class="method-name">disabled? => <i>Boolean</i><br />
|
347
388
|
</span>
|
348
389
|
</a>
|
@@ -357,12 +398,12 @@ and not considered when scanning the format string); otherwise returns
|
|
357
398
|
</div>
|
358
399
|
</div>
|
359
400
|
|
360
|
-
<div id="method-
|
361
|
-
<a name="
|
401
|
+
<div id="method-M000013" class="method-detail">
|
402
|
+
<a name="M000013"></a>
|
362
403
|
|
363
404
|
<div class="method-heading">
|
364
|
-
<a href="Effector.src/
|
365
|
-
onclick="popupCode('Effector.src/
|
405
|
+
<a href="Effector.src/M000013.html" target="Code" class="method-signature"
|
406
|
+
onclick="popupCode('Effector.src/M000013.html');return false;">
|
366
407
|
<span class="method-name">enable<i>()</i> => <i>nil</i><br />
|
367
408
|
</span>
|
368
409
|
</a>
|
@@ -376,12 +417,12 @@ string is being scanned. This is a no-op if the effector is already active.
|
|
376
417
|
</div>
|
377
418
|
</div>
|
378
419
|
|
379
|
-
<div id="method-
|
380
|
-
<a name="
|
420
|
+
<div id="method-M000014" class="method-detail">
|
421
|
+
<a name="M000014"></a>
|
381
422
|
|
382
423
|
<div class="method-heading">
|
383
|
-
<a href="Effector.src/
|
384
|
-
onclick="popupCode('Effector.src/
|
424
|
+
<a href="Effector.src/M000014.html" target="Code" class="method-signature"
|
425
|
+
onclick="popupCode('Effector.src/M000014.html');return false;">
|
385
426
|
<span class="method-name">enabled? => <i>Boolean</i><br />
|
386
427
|
</span>
|
387
428
|
</a>
|
@@ -10,7 +10,7 @@
|
|
10
10
|
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
11
11
|
</head>
|
12
12
|
<body class="standalone-code">
|
13
|
-
<pre><span class="ruby-comment cmt"># File lib/fto.rb, line
|
13
|
+
<pre><span class="ruby-comment cmt"># File lib/fto.rb, line 614</span>
|
14
14
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">argsp</span>)
|
15
15
|
<span class="ruby-ivar">@id</span> = <span class="ruby-ivar">@@NEXTID</span>
|
16
16
|
<span class="ruby-ivar">@@NEXTID</span> <span class="ruby-operator">+=</span> <span class="ruby-value">1</span>
|
@@ -5,15 +5,39 @@
|
|
5
5
|
|
6
6
|
<html>
|
7
7
|
<head>
|
8
|
-
<title>
|
8
|
+
<title>new (FormatText::Effector)</title>
|
9
9
|
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
10
|
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
11
11
|
</head>
|
12
12
|
<body class="standalone-code">
|
13
|
-
<pre><span class="ruby-comment cmt"># File lib/fto.rb, line
|
14
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">
|
15
|
-
<span class="ruby-ivar">@
|
16
|
-
<span class="ruby-
|
13
|
+
<pre><span class="ruby-comment cmt"># File lib/fto.rb, line 642</span>
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">argsp</span>)
|
15
|
+
<span class="ruby-ivar">@id</span> = <span class="ruby-ivar">@@NEXTID</span>
|
16
|
+
<span class="ruby-ivar">@@NEXTID</span> <span class="ruby-operator">+=</span> <span class="ruby-value">1</span>
|
17
|
+
<span class="ruby-comment cmt">#</span>
|
18
|
+
<span class="ruby-comment cmt"># Set up defaults</span>
|
19
|
+
<span class="ruby-comment cmt">#</span>
|
20
|
+
(<span class="ruby-ivar">@name</span>, <span class="ruby-ivar">@description</span>, <span class="ruby-ivar">@code</span>, <span class="ruby-ivar">@reMatch</span>, <span class="ruby-ivar">@reExtra</span>, <span class="ruby-ivar">@mask</span>,
|
21
|
+
<span class="ruby-ivar">@signbit</span>, <span class="ruby-ivar">@dWidth</span>, <span class="ruby-ivar">@dValue</span>, <span class="ruby-ivar">@truncate</span>) = <span class="ruby-keyword kw">nil</span>
|
22
|
+
<span class="ruby-ivar">@enabled</span> = <span class="ruby-keyword kw">true</span>
|
23
|
+
<span class="ruby-ivar">@priority</span> = <span class="ruby-value">1000</span>
|
24
|
+
<span class="ruby-ivar">@data</span> = []
|
25
|
+
<span class="ruby-ivar">@fill</span> = <span class="ruby-value str">' '</span>
|
26
|
+
<span class="ruby-ivar">@justify</span> = <span class="ruby-identifier">:left</span>
|
27
|
+
<span class="ruby-comment cmt">#</span>
|
28
|
+
<span class="ruby-comment cmt"># We can either handle an order-dependent list of arguments, or</span>
|
29
|
+
<span class="ruby-comment cmt"># a hash representing keyword arguments.</span>
|
30
|
+
<span class="ruby-comment cmt">#</span>
|
31
|
+
<span class="ruby-identifier">args</span> = (<span class="ruby-identifier">argsp</span>.<span class="ruby-identifier">length</span> <span class="ruby-operator">==</span> <span class="ruby-value">1</span>) <span class="ruby-operator">?</span> <span class="ruby-identifier">argsp</span>[<span class="ruby-value">0</span>] <span class="ruby-operator">:</span> <span class="ruby-identifier">argsp</span>
|
32
|
+
<span class="ruby-keyword kw">case</span> <span class="ruby-identifier">args</span>.<span class="ruby-identifier">class</span>
|
33
|
+
<span class="ruby-keyword kw">when</span> <span class="ruby-constant">Array</span>
|
34
|
+
(<span class="ruby-ivar">@name</span>, <span class="ruby-ivar">@description</span>, <span class="ruby-ivar">@enabled</span>, <span class="ruby-ivar">@priority</span>, <span class="ruby-ivar">@code</span>, <span class="ruby-ivar">@reMatch</span>,
|
35
|
+
<span class="ruby-ivar">@reExtra</span>, <span class="ruby-ivar">@mask</span>, <span class="ruby-ivar">@signbit</span>, <span class="ruby-ivar">@dWidth</span>, <span class="ruby-ivar">@fill</span>, <span class="ruby-ivar">@justify</span>,
|
36
|
+
<span class="ruby-ivar">@truncate</span>, <span class="ruby-ivar">@data</span>) = <span class="ruby-identifier">args</span>
|
37
|
+
<span class="ruby-keyword kw">when</span> <span class="ruby-constant">Hash</span>
|
38
|
+
<span class="ruby-identifier">args</span>.<span class="ruby-identifier">each</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">key</span>,<span class="ruby-identifier">val</span><span class="ruby-operator">|</span> <span class="ruby-identifier">eval</span>(<span class="ruby-value str">"@{key.to_s} = val"</span>) }
|
39
|
+
<span class="ruby-keyword kw">end</span>
|
40
|
+
<span class="ruby-ivar">@data</span> = [<span class="ruby-ivar">@data</span>] <span class="ruby-keyword kw">unless</span> (<span class="ruby-ivar">@data</span>.<span class="ruby-identifier">nil?</span> <span class="ruby-operator">||</span> (<span class="ruby-ivar">@data</span>.<span class="ruby-identifier">class</span> <span class="ruby-operator">==</span> <span class="ruby-constant">Array</span>))
|
17
41
|
<span class="ruby-keyword kw">end</span></pre>
|
18
42
|
</body>
|
19
43
|
</html>
|
@@ -5,14 +5,15 @@
|
|
5
5
|
|
6
6
|
<html>
|
7
7
|
<head>
|
8
|
-
<title>
|
8
|
+
<title>disable (FormatText::Effector)</title>
|
9
9
|
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
10
|
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
11
11
|
</head>
|
12
12
|
<body class="standalone-code">
|
13
|
-
<pre><span class="ruby-comment cmt"># File lib/fto.rb, line
|
14
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">
|
15
|
-
<span class="ruby-
|
13
|
+
<pre><span class="ruby-comment cmt"># File lib/fto.rb, line 680</span>
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">disable</span>()
|
15
|
+
<span class="ruby-ivar">@enabled</span> = <span class="ruby-keyword kw">false</span>
|
16
|
+
<span class="ruby-constant">FTO</span>.<span class="ruby-identifier">rebuildEffectorList</span>()
|
16
17
|
<span class="ruby-keyword kw">end</span></pre>
|
17
18
|
</body>
|
18
19
|
</html>
|
@@ -5,15 +5,14 @@
|
|
5
5
|
|
6
6
|
<html>
|
7
7
|
<head>
|
8
|
-
<title>
|
8
|
+
<title>disabled? (FormatText::Effector)</title>
|
9
9
|
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
10
|
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
11
11
|
</head>
|
12
12
|
<body class="standalone-code">
|
13
|
-
<pre><span class="ruby-comment cmt"># File lib/fto.rb, line
|
14
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">
|
15
|
-
<span class="ruby-
|
16
|
-
<span class="ruby-constant">FTO</span>.<span class="ruby-identifier">rebuildEffectorList</span>()
|
13
|
+
<pre><span class="ruby-comment cmt"># File lib/fto.rb, line 693</span>
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">disabled?</span>()
|
15
|
+
<span class="ruby-operator">!</span> <span class="ruby-ivar">@enabled</span>
|
17
16
|
<span class="ruby-keyword kw">end</span></pre>
|
18
17
|
</body>
|
19
18
|
</html>
|
@@ -5,14 +5,15 @@
|
|
5
5
|
|
6
6
|
<html>
|
7
7
|
<head>
|
8
|
-
<title>
|
8
|
+
<title>enable (FormatText::Effector)</title>
|
9
9
|
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
10
|
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
11
11
|
</head>
|
12
12
|
<body class="standalone-code">
|
13
|
-
<pre><span class="ruby-comment cmt"># File lib/fto.rb, line
|
14
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">
|
15
|
-
<span class="ruby-ivar">@enabled</span>
|
13
|
+
<pre><span class="ruby-comment cmt"># File lib/fto.rb, line 705</span>
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">enable</span>()
|
15
|
+
<span class="ruby-ivar">@enabled</span> = <span class="ruby-keyword kw">true</span>
|
16
|
+
<span class="ruby-constant">FTO</span>.<span class="ruby-identifier">rebuildEffectorList</span>()
|
16
17
|
<span class="ruby-keyword kw">end</span></pre>
|
17
18
|
</body>
|
18
19
|
</html>
|
@@ -10,7 +10,7 @@
|
|
10
10
|
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
11
11
|
</head>
|
12
12
|
<body class="standalone-code">
|
13
|
-
<pre><span class="ruby-comment cmt"># File lib/fto.rb, line
|
13
|
+
<pre><span class="ruby-comment cmt"># File lib/fto.rb, line 718</span>
|
14
14
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">enabled?</span>()
|
15
15
|
<span class="ruby-ivar">@enabled</span>
|
16
16
|
<span class="ruby-keyword kw">end</span></pre>
|