fto 0.1.0
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.
- data/CONTRIBUTORS.txt +5 -0
- data/LICENCE.txt +202 -0
- data/README.txt +75 -0
- data/doc/classes/FormatText.html +120 -0
- data/doc/classes/FormatText/Context.html +240 -0
- data/doc/classes/FormatText/Context.src/M000001.html +26 -0
- data/doc/classes/FormatText/Context.src/M000004.html +26 -0
- data/doc/classes/FormatText/Context.src/M000007.html +26 -0
- data/doc/classes/FormatText/Context.src/M000008.html +26 -0
- data/doc/classes/FormatText/Context.src/M000009.html +26 -0
- data/doc/classes/FormatText/Effector.html +411 -0
- data/doc/classes/FormatText/Effector.src/M000004.html +38 -0
- data/doc/classes/FormatText/Effector.src/M000005.html +39 -0
- data/doc/classes/FormatText/Effector.src/M000007.html +38 -0
- data/doc/classes/FormatText/Effector.src/M000008.html +42 -0
- data/doc/classes/FormatText/Effector.src/M000009.html +43 -0
- data/doc/classes/FormatText/Effector.src/M000010.html +19 -0
- data/doc/classes/FormatText/Effector.src/M000011.html +18 -0
- data/doc/classes/FormatText/Effector.src/M000012.html +19 -0
- data/doc/classes/FormatText/Effector.src/M000013.html +18 -0
- data/doc/classes/FormatText/Effector.src/M000014.html +18 -0
- data/doc/classes/FormatText/FTO.html +305 -0
- data/doc/classes/FormatText/FTO.src/M000001.html +19 -0
- data/doc/classes/FormatText/FTO.src/M000002.html +34 -0
- data/doc/classes/FormatText/FTO.src/M000003.html +22 -0
- data/doc/classes/FormatText/FTO.src/M000004.html +19 -0
- data/doc/classes/FormatText/FTO.src/M000005.html +22 -0
- data/doc/classes/FormatText/FTO.src/M000006.html +20 -0
- data/doc/classes/FormatText/FTO.src/M000007.html +63 -0
- data/doc/classes/FormatText/FTO.src/M000008.html +63 -0
- data/doc/created.rid +1 -0
- data/doc/files/fto_rb.html +141 -0
- data/doc/files/lib/fto_rb.html +150 -0
- data/doc/fr_class_index.html +30 -0
- data/doc/fr_file_index.html +27 -0
- data/doc/fr_method_index.html +39 -0
- data/doc/index.html +24 -0
- data/doc/rdoc-style.css +208 -0
- data/lib/fto.rb +1349 -0
- data/test/test_fto_api.rb +143 -0
- data/test/test_fto_effectors.rb +440 -0
- data/test/test_helper.rb +3 -0
- metadata +115 -0
@@ -0,0 +1,26 @@
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
+
<!DOCTYPE html
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
+
|
6
|
+
<html>
|
7
|
+
<head>
|
8
|
+
<title>new (FormatText::Context)</title>
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
+
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
11
|
+
</head>
|
12
|
+
<body class="standalone-code">
|
13
|
+
<pre><span class="ruby-comment cmt"># File lib/fto.rb, line 178</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">@effectorObj</span>, <span class="ruby-ivar">@ftoObj</span>) = <span class="ruby-keyword kw">nil</span>
|
16
|
+
<span class="ruby-ivar">@sMatched</span> = <span class="ruby-value str">''</span>
|
17
|
+
<span class="ruby-ivar">@usedArgs</span> = []
|
18
|
+
<span class="ruby-ivar">@argList</span> = []
|
19
|
+
<span class="ruby-ivar">@reuseArg</span> = <span class="ruby-keyword kw">false</span>
|
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>
|
22
|
+
<span class="ruby-keyword kw">end</span>
|
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
|
+
<span class="ruby-keyword kw">end</span></pre>
|
25
|
+
</body>
|
26
|
+
</html>
|
@@ -0,0 +1,26 @@
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
+
<!DOCTYPE html
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
+
|
6
|
+
<html>
|
7
|
+
<head>
|
8
|
+
<title>new (FormatText::Context)</title>
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
+
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
11
|
+
</head>
|
12
|
+
<body class="standalone-code">
|
13
|
+
<pre><span class="ruby-comment cmt"># File lib/fto.rb, line 157</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">@effectorObj</span>, <span class="ruby-ivar">@ftoObj</span>) = <span class="ruby-keyword kw">nil</span>
|
16
|
+
<span class="ruby-ivar">@sMatched</span> = <span class="ruby-value str">''</span>
|
17
|
+
<span class="ruby-ivar">@usedArgs</span> = []
|
18
|
+
<span class="ruby-ivar">@argList</span> = []
|
19
|
+
<span class="ruby-ivar">@reuseArg</span> = <span class="ruby-keyword kw">false</span>
|
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>
|
22
|
+
<span class="ruby-keyword kw">end</span>
|
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
|
+
<span class="ruby-keyword kw">end</span></pre>
|
25
|
+
</body>
|
26
|
+
</html>
|
@@ -0,0 +1,26 @@
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
+
<!DOCTYPE html
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
+
|
6
|
+
<html>
|
7
|
+
<head>
|
8
|
+
<title>new (FormatText::Context)</title>
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
+
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
11
|
+
</head>
|
12
|
+
<body class="standalone-code">
|
13
|
+
<pre><span class="ruby-comment cmt"># File lib/fto.rb, line 163</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">@effectorObj</span>, <span class="ruby-ivar">@ftoObj</span>) = <span class="ruby-keyword kw">nil</span>
|
16
|
+
<span class="ruby-ivar">@sMatched</span> = <span class="ruby-value str">''</span>
|
17
|
+
<span class="ruby-ivar">@usedArgs</span> = []
|
18
|
+
<span class="ruby-ivar">@argList</span> = []
|
19
|
+
<span class="ruby-ivar">@reuseArg</span> = <span class="ruby-keyword kw">false</span>
|
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>
|
22
|
+
<span class="ruby-keyword kw">end</span>
|
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
|
+
<span class="ruby-keyword kw">end</span></pre>
|
25
|
+
</body>
|
26
|
+
</html>
|
@@ -0,0 +1,26 @@
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
+
<!DOCTYPE html
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
+
|
6
|
+
<html>
|
7
|
+
<head>
|
8
|
+
<title>new (FormatText::Context)</title>
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
+
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
11
|
+
</head>
|
12
|
+
<body class="standalone-code">
|
13
|
+
<pre><span class="ruby-comment cmt"># File lib/fto.rb, line 188</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">@effectorObj</span>, <span class="ruby-ivar">@ftoObj</span>) = <span class="ruby-keyword kw">nil</span>
|
16
|
+
<span class="ruby-ivar">@sMatched</span> = <span class="ruby-value str">''</span>
|
17
|
+
<span class="ruby-ivar">@usedArgs</span> = []
|
18
|
+
<span class="ruby-ivar">@argList</span> = []
|
19
|
+
<span class="ruby-ivar">@reuseArg</span> = <span class="ruby-keyword kw">false</span>
|
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-identifier">_</span>(<span class="ruby-value str">' requires a Hash to create'</span>)
|
22
|
+
<span class="ruby-keyword kw">end</span>
|
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
|
+
<span class="ruby-keyword kw">end</span></pre>
|
25
|
+
</body>
|
26
|
+
</html>
|
@@ -0,0 +1,26 @@
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
+
<!DOCTYPE html
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
+
|
6
|
+
<html>
|
7
|
+
<head>
|
8
|
+
<title>new (FormatText::Context)</title>
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
+
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
11
|
+
</head>
|
12
|
+
<body class="standalone-code">
|
13
|
+
<pre><span class="ruby-comment cmt"># File lib/fto.rb, line 178</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">@effectorObj</span>, <span class="ruby-ivar">@ftoObj</span>) = <span class="ruby-keyword kw">nil</span>
|
16
|
+
<span class="ruby-ivar">@sMatched</span> = <span class="ruby-value str">''</span>
|
17
|
+
<span class="ruby-ivar">@usedArgs</span> = []
|
18
|
+
<span class="ruby-ivar">@argList</span> = []
|
19
|
+
<span class="ruby-ivar">@reuseArg</span> = <span class="ruby-keyword kw">false</span>
|
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>
|
22
|
+
<span class="ruby-keyword kw">end</span>
|
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
|
+
<span class="ruby-keyword kw">end</span></pre>
|
25
|
+
</body>
|
26
|
+
</html>
|
@@ -0,0 +1,411 @@
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
+
<!DOCTYPE html
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
+
|
6
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
7
|
+
<head>
|
8
|
+
<title>Class: FormatText::Effector</title>
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
+
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
11
|
+
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
12
|
+
<script type="text/javascript">
|
13
|
+
// <![CDATA[
|
14
|
+
|
15
|
+
function popupCode( url ) {
|
16
|
+
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
17
|
+
}
|
18
|
+
|
19
|
+
function toggleCode( id ) {
|
20
|
+
if ( document.getElementById )
|
21
|
+
elem = document.getElementById( id );
|
22
|
+
else if ( document.all )
|
23
|
+
elem = eval( "document.all." + id );
|
24
|
+
else
|
25
|
+
return false;
|
26
|
+
|
27
|
+
elemStyle = elem.style;
|
28
|
+
|
29
|
+
if ( elemStyle.display != "block" ) {
|
30
|
+
elemStyle.display = "block"
|
31
|
+
} else {
|
32
|
+
elemStyle.display = "none"
|
33
|
+
}
|
34
|
+
|
35
|
+
return true;
|
36
|
+
}
|
37
|
+
|
38
|
+
// Make codeblocks hidden by default
|
39
|
+
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
40
|
+
|
41
|
+
// ]]>
|
42
|
+
</script>
|
43
|
+
|
44
|
+
</head>
|
45
|
+
<body>
|
46
|
+
|
47
|
+
|
48
|
+
|
49
|
+
<div id="classHeader">
|
50
|
+
<table class="header-table">
|
51
|
+
<tr class="top-aligned-row">
|
52
|
+
<td><strong>Class</strong></td>
|
53
|
+
<td class="class-name-in-header">FormatText::Effector</td>
|
54
|
+
</tr>
|
55
|
+
<tr class="top-aligned-row">
|
56
|
+
<td><strong>In:</strong></td>
|
57
|
+
<td>
|
58
|
+
<a href="../../files/lib/fto_rb.html">
|
59
|
+
lib/fto.rb
|
60
|
+
</a>
|
61
|
+
<br />
|
62
|
+
</td>
|
63
|
+
</tr>
|
64
|
+
|
65
|
+
<tr class="top-aligned-row">
|
66
|
+
<td><strong>Parent:</strong></td>
|
67
|
+
<td>
|
68
|
+
Object
|
69
|
+
</td>
|
70
|
+
</tr>
|
71
|
+
</table>
|
72
|
+
</div>
|
73
|
+
<!-- banner header -->
|
74
|
+
|
75
|
+
<div id="bodyContent">
|
76
|
+
|
77
|
+
|
78
|
+
|
79
|
+
<div id="contextContent">
|
80
|
+
|
81
|
+
<div id="description">
|
82
|
+
<p>
|
83
|
+
Class used to describe a format effector. The <em><a
|
84
|
+
href="Effector.html">FormatText::Effector</a></em> class is basically a
|
85
|
+
container rather than an active class. It holds information about how an
|
86
|
+
effector operates and what it needs.
|
87
|
+
</p>
|
88
|
+
<p>
|
89
|
+
Typically <em><a href="Effector.html">FormatText::Effector</a></em> objects
|
90
|
+
aren‘t created directly, but by calling <em><a
|
91
|
+
href="FTO.html#M000002">FTO.registerEffector</a>()</em>.
|
92
|
+
</p>
|
93
|
+
|
94
|
+
</div>
|
95
|
+
|
96
|
+
|
97
|
+
</div>
|
98
|
+
|
99
|
+
<div id="method-list">
|
100
|
+
<h3 class="section-bar">Methods</h3>
|
101
|
+
|
102
|
+
<div class="name-list">
|
103
|
+
<a href="#M000010">disable</a>
|
104
|
+
<a href="#M000011">disabled?</a>
|
105
|
+
<a href="#M000012">enable</a>
|
106
|
+
<a href="#M000013">enabled?</a>
|
107
|
+
<a href="#M000009">new</a>
|
108
|
+
</div>
|
109
|
+
</div>
|
110
|
+
|
111
|
+
</div>
|
112
|
+
|
113
|
+
|
114
|
+
<!-- if includes -->
|
115
|
+
|
116
|
+
<div id="section">
|
117
|
+
|
118
|
+
|
119
|
+
|
120
|
+
|
121
|
+
|
122
|
+
<div id="attribute-list">
|
123
|
+
<h3 class="section-bar">Attributes</h3>
|
124
|
+
|
125
|
+
<div class="name-list">
|
126
|
+
<table>
|
127
|
+
<tr class="top-aligned-row context-row">
|
128
|
+
<td class="context-item-name">code</td>
|
129
|
+
<td class="context-item-value"> [RW] </td>
|
130
|
+
<td class="context-item-desc">
|
131
|
+
<em>Proc</em>. Code block (<em>e.g.</em>, a <tt>lambda</tt> function) that
|
132
|
+
actually interprets the effector. (See the <em><a
|
133
|
+
href="Context.html">FormatText::Context</a></em> class for a description,
|
134
|
+
or the various <tt>Convert</tt> constants in the source.)
|
135
|
+
|
136
|
+
</td>
|
137
|
+
</tr>
|
138
|
+
<tr class="top-aligned-row context-row">
|
139
|
+
<td class="context-item-name">dValue</td>
|
140
|
+
<td class="context-item-value"> [RW] </td>
|
141
|
+
<td class="context-item-desc">
|
142
|
+
<em>Any</em>. Default value (used if <em>argList</em> has been exhausted).
|
143
|
+
|
144
|
+
</td>
|
145
|
+
</tr>
|
146
|
+
<tr class="top-aligned-row context-row">
|
147
|
+
<td class="context-item-name">dWidth</td>
|
148
|
+
<td class="context-item-value"> [RW] </td>
|
149
|
+
<td class="context-item-desc">
|
150
|
+
<em>Fixnum</em>. Default width for the effector result (used when filling).
|
151
|
+
|
152
|
+
</td>
|
153
|
+
</tr>
|
154
|
+
<tr class="top-aligned-row context-row">
|
155
|
+
<td class="context-item-name">data</td>
|
156
|
+
<td class="context-item-value"> [RW] </td>
|
157
|
+
<td class="context-item-desc">
|
158
|
+
<em>Array</em>. Array of additional info for the function
|
159
|
+
(effector-specific).
|
160
|
+
|
161
|
+
</td>
|
162
|
+
</tr>
|
163
|
+
<tr class="top-aligned-row context-row">
|
164
|
+
<td class="context-item-name">description</td>
|
165
|
+
<td class="context-item-value"> [RW] </td>
|
166
|
+
<td class="context-item-desc">
|
167
|
+
<em>String</em>. Human-readable brief description.
|
168
|
+
|
169
|
+
</td>
|
170
|
+
</tr>
|
171
|
+
<tr class="top-aligned-row context-row">
|
172
|
+
<td class="context-item-name">enabled</td>
|
173
|
+
<td class="context-item-value"> [RW] </td>
|
174
|
+
<td class="context-item-desc">
|
175
|
+
<em>Boolean</em>. Whether this effector should be processed or ignored.
|
176
|
+
|
177
|
+
</td>
|
178
|
+
</tr>
|
179
|
+
<tr class="top-aligned-row context-row">
|
180
|
+
<td class="context-item-name">fill</td>
|
181
|
+
<td class="context-item-value"> [RW] </td>
|
182
|
+
<td class="context-item-desc">
|
183
|
+
<em>String</em>. Character used to fill values shorter than the field
|
184
|
+
widths.
|
185
|
+
|
186
|
+
</td>
|
187
|
+
</tr>
|
188
|
+
<tr class="top-aligned-row context-row">
|
189
|
+
<td class="context-item-name">id</td>
|
190
|
+
<td class="context-item-value"> [R] </td>
|
191
|
+
<td class="context-item-desc">
|
192
|
+
<em>Fixnum</em>. ID number assigned to the effector, unique within a usage
|
193
|
+
environment. Used by <em><a
|
194
|
+
href="FTO.html#M000003">FTO.enableEffector</a>()</em>, <em><a
|
195
|
+
href="FTO.html#M000005">FTO.disableEffector</a>()</em>, and <em><a
|
196
|
+
href="FTO.html#M000004">FTO.destroyEffector</a>()</em>.
|
197
|
+
|
198
|
+
</td>
|
199
|
+
</tr>
|
200
|
+
<tr class="top-aligned-row context-row">
|
201
|
+
<td class="context-item-name">justify</td>
|
202
|
+
<td class="context-item-value"> [RW] </td>
|
203
|
+
<td class="context-item-desc">
|
204
|
+
<em>Symbol</em>. Symbol value <tt>:left</tt> or <tt>:right</tt>, indicating
|
205
|
+
against which edge of a too-wide field the value should abut.
|
206
|
+
|
207
|
+
</td>
|
208
|
+
</tr>
|
209
|
+
<tr class="top-aligned-row context-row">
|
210
|
+
<td class="context-item-name">mask</td>
|
211
|
+
<td class="context-item-value"> [RW] </td>
|
212
|
+
<td class="context-item-desc">
|
213
|
+
<em>Integer</em>. [<em>Numeric conversion effectors only</em>] If the
|
214
|
+
effector is used to represent a number, this is a mask of the bits to be
|
215
|
+
included. For instance, if the effector only displays 8-bit values, this
|
216
|
+
value would be <tt>0xFF</tt>.
|
217
|
+
|
218
|
+
</td>
|
219
|
+
</tr>
|
220
|
+
<tr class="top-aligned-row context-row">
|
221
|
+
<td class="context-item-name">name</td>
|
222
|
+
<td class="context-item-value"> [RW] </td>
|
223
|
+
<td class="context-item-desc">
|
224
|
+
<em>String</em>. Human-readable name for what the effector does. Used for
|
225
|
+
sorting.
|
226
|
+
|
227
|
+
</td>
|
228
|
+
</tr>
|
229
|
+
<tr class="top-aligned-row context-row">
|
230
|
+
<td class="context-item-name">priority</td>
|
231
|
+
<td class="context-item-value"> [RW] </td>
|
232
|
+
<td class="context-item-desc">
|
233
|
+
<em>Fixnum</em>. Numeric priority value for sorting purposes.
|
234
|
+
|
235
|
+
</td>
|
236
|
+
</tr>
|
237
|
+
<tr class="top-aligned-row context-row">
|
238
|
+
<td class="context-item-name">reExtra</td>
|
239
|
+
<td class="context-item-value"> [RW] </td>
|
240
|
+
<td class="context-item-desc">
|
241
|
+
<em>String</em>. Optional regex pattern used to extract additional info
|
242
|
+
(such as a field width).
|
243
|
+
|
244
|
+
</td>
|
245
|
+
</tr>
|
246
|
+
<tr class="top-aligned-row context-row">
|
247
|
+
<td class="context-item-name">reMatch</td>
|
248
|
+
<td class="context-item-value"> [RW] </td>
|
249
|
+
<td class="context-item-desc">
|
250
|
+
<em>String</em>. Regular expression used to recognise the effector in the
|
251
|
+
format string.
|
252
|
+
|
253
|
+
</td>
|
254
|
+
</tr>
|
255
|
+
<tr class="top-aligned-row context-row">
|
256
|
+
<td class="context-item-name">signbit</td>
|
257
|
+
<td class="context-item-value"> [RW] </td>
|
258
|
+
<td class="context-item-desc">
|
259
|
+
<em>Integer</em>. [<em>Numeric conversion effectors only</em>] If the value
|
260
|
+
is to be interpreted as signed, this is a mask for the sign bit. (For a
|
261
|
+
byte, <tt>:mask</tt> would be <tt>0xFF</tt> and <tt>:signbit</tt> would be
|
262
|
+
<tt>0x80</tt>.)
|
263
|
+
|
264
|
+
</td>
|
265
|
+
</tr>
|
266
|
+
<tr class="top-aligned-row context-row">
|
267
|
+
<td class="context-item-name">sortKey</td>
|
268
|
+
<td class="context-item-value"> [RW] </td>
|
269
|
+
<td class="context-item-desc">
|
270
|
+
<em>String</em>. Key used to sort effectors, built from the name and
|
271
|
+
priority.
|
272
|
+
|
273
|
+
</td>
|
274
|
+
</tr>
|
275
|
+
<tr class="top-aligned-row context-row">
|
276
|
+
<td class="context-item-name">truncate</td>
|
277
|
+
<td class="context-item-value"> [RW] </td>
|
278
|
+
<td class="context-item-desc">
|
279
|
+
<em>Symbol</em>. Symbol value <tt>:left</tt> or <tt>:right</tt> indicating
|
280
|
+
on which side too-wide results should be truncated to fit within the field
|
281
|
+
width.
|
282
|
+
|
283
|
+
</td>
|
284
|
+
</tr>
|
285
|
+
</table>
|
286
|
+
</div>
|
287
|
+
</div>
|
288
|
+
|
289
|
+
|
290
|
+
|
291
|
+
<!-- if method_list -->
|
292
|
+
<div id="methods">
|
293
|
+
<h3 class="section-bar">Public Class methods</h3>
|
294
|
+
|
295
|
+
<div id="method-M000009" class="method-detail">
|
296
|
+
<a name="M000009"></a>
|
297
|
+
|
298
|
+
<div class="method-heading">
|
299
|
+
<a href="Effector.src/M000009.html" target="Code" class="method-signature"
|
300
|
+
onclick="popupCode('Effector.src/M000009.html');return false;">
|
301
|
+
<span class="method-name">new<i>(Hash)</i> => <i>FormatText::Effector object</i><br />
|
302
|
+
new<i>(name, description, enabled, priority, code, reMatch, reExtra, mask, signbit, dWidth, fill, justify, truncate, data)</i> => <i>FormatText::Effector object</i><br />
|
303
|
+
</span>
|
304
|
+
</a>
|
305
|
+
</div>
|
306
|
+
|
307
|
+
<div class="method-description">
|
308
|
+
<p>
|
309
|
+
Creates a <a href="Effector.html#M000009">new</a> <em><a
|
310
|
+
href="Effector.html">FormatText::Effector</a></em> object. The argument
|
311
|
+
list can be either an order-dependent list of attribute values, or a hash
|
312
|
+
using the symbolised attribute names as the keys.
|
313
|
+
</p>
|
314
|
+
</div>
|
315
|
+
</div>
|
316
|
+
|
317
|
+
<h3 class="section-bar">Public Instance methods</h3>
|
318
|
+
|
319
|
+
<div id="method-M000010" class="method-detail">
|
320
|
+
<a name="M000010"></a>
|
321
|
+
|
322
|
+
<div class="method-heading">
|
323
|
+
<a href="Effector.src/M000010.html" target="Code" class="method-signature"
|
324
|
+
onclick="popupCode('Effector.src/M000010.html');return false;">
|
325
|
+
<span class="method-name">disable<i>()</i> => <i>nil</i><br />
|
326
|
+
</span>
|
327
|
+
</a>
|
328
|
+
</div>
|
329
|
+
|
330
|
+
<div class="method-description">
|
331
|
+
<p>
|
332
|
+
Disables the effector, removing it from consideration when the format
|
333
|
+
string is being scanned. It can be subsequently re-enabled with the <em><a
|
334
|
+
href="Effector.html#M000012">Effector#enable</a>()</em> method. This is a
|
335
|
+
no-op if the effector is already disabled.
|
336
|
+
</p>
|
337
|
+
</div>
|
338
|
+
</div>
|
339
|
+
|
340
|
+
<div id="method-M000011" class="method-detail">
|
341
|
+
<a name="M000011"></a>
|
342
|
+
|
343
|
+
<div class="method-heading">
|
344
|
+
<a href="Effector.src/M000011.html" target="Code" class="method-signature"
|
345
|
+
onclick="popupCode('Effector.src/M000011.html');return false;">
|
346
|
+
<span class="method-name">disabled? => <i>Boolean</i><br />
|
347
|
+
</span>
|
348
|
+
</a>
|
349
|
+
</div>
|
350
|
+
|
351
|
+
<div class="method-description">
|
352
|
+
<p>
|
353
|
+
Returns <tt>true</tt> if the effector is disabled (<em>i.e.</em>, inactive
|
354
|
+
and not considered when scanning the format string); otherwise returns
|
355
|
+
<tt>false</tt>.
|
356
|
+
</p>
|
357
|
+
</div>
|
358
|
+
</div>
|
359
|
+
|
360
|
+
<div id="method-M000012" class="method-detail">
|
361
|
+
<a name="M000012"></a>
|
362
|
+
|
363
|
+
<div class="method-heading">
|
364
|
+
<a href="Effector.src/M000012.html" target="Code" class="method-signature"
|
365
|
+
onclick="popupCode('Effector.src/M000012.html');return false;">
|
366
|
+
<span class="method-name">enable<i>()</i> => <i>nil</i><br />
|
367
|
+
</span>
|
368
|
+
</a>
|
369
|
+
</div>
|
370
|
+
|
371
|
+
<div class="method-description">
|
372
|
+
<p>
|
373
|
+
Enables the effector, making certain that it is considered when the format
|
374
|
+
string is being scanned. This is a no-op if the effector is already active.
|
375
|
+
</p>
|
376
|
+
</div>
|
377
|
+
</div>
|
378
|
+
|
379
|
+
<div id="method-M000013" class="method-detail">
|
380
|
+
<a name="M000013"></a>
|
381
|
+
|
382
|
+
<div class="method-heading">
|
383
|
+
<a href="Effector.src/M000013.html" target="Code" class="method-signature"
|
384
|
+
onclick="popupCode('Effector.src/M000013.html');return false;">
|
385
|
+
<span class="method-name">enabled? => <i>Boolean</i><br />
|
386
|
+
</span>
|
387
|
+
</a>
|
388
|
+
</div>
|
389
|
+
|
390
|
+
<div class="method-description">
|
391
|
+
<p>
|
392
|
+
Returns <tt>true</tt> if the effector is enabled (<em>i.e.</em>, active and
|
393
|
+
considered when scanning the format string); otherwise returns
|
394
|
+
<tt>false</tt>.
|
395
|
+
</p>
|
396
|
+
</div>
|
397
|
+
</div>
|
398
|
+
|
399
|
+
|
400
|
+
</div>
|
401
|
+
|
402
|
+
|
403
|
+
</div>
|
404
|
+
|
405
|
+
|
406
|
+
<div id="validator-badges">
|
407
|
+
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
408
|
+
</div>
|
409
|
+
|
410
|
+
</body>
|
411
|
+
</html>
|