fto 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (43) hide show
  1. data/CONTRIBUTORS.txt +5 -0
  2. data/LICENCE.txt +202 -0
  3. data/README.txt +75 -0
  4. data/doc/classes/FormatText.html +120 -0
  5. data/doc/classes/FormatText/Context.html +240 -0
  6. data/doc/classes/FormatText/Context.src/M000001.html +26 -0
  7. data/doc/classes/FormatText/Context.src/M000004.html +26 -0
  8. data/doc/classes/FormatText/Context.src/M000007.html +26 -0
  9. data/doc/classes/FormatText/Context.src/M000008.html +26 -0
  10. data/doc/classes/FormatText/Context.src/M000009.html +26 -0
  11. data/doc/classes/FormatText/Effector.html +411 -0
  12. data/doc/classes/FormatText/Effector.src/M000004.html +38 -0
  13. data/doc/classes/FormatText/Effector.src/M000005.html +39 -0
  14. data/doc/classes/FormatText/Effector.src/M000007.html +38 -0
  15. data/doc/classes/FormatText/Effector.src/M000008.html +42 -0
  16. data/doc/classes/FormatText/Effector.src/M000009.html +43 -0
  17. data/doc/classes/FormatText/Effector.src/M000010.html +19 -0
  18. data/doc/classes/FormatText/Effector.src/M000011.html +18 -0
  19. data/doc/classes/FormatText/Effector.src/M000012.html +19 -0
  20. data/doc/classes/FormatText/Effector.src/M000013.html +18 -0
  21. data/doc/classes/FormatText/Effector.src/M000014.html +18 -0
  22. data/doc/classes/FormatText/FTO.html +305 -0
  23. data/doc/classes/FormatText/FTO.src/M000001.html +19 -0
  24. data/doc/classes/FormatText/FTO.src/M000002.html +34 -0
  25. data/doc/classes/FormatText/FTO.src/M000003.html +22 -0
  26. data/doc/classes/FormatText/FTO.src/M000004.html +19 -0
  27. data/doc/classes/FormatText/FTO.src/M000005.html +22 -0
  28. data/doc/classes/FormatText/FTO.src/M000006.html +20 -0
  29. data/doc/classes/FormatText/FTO.src/M000007.html +63 -0
  30. data/doc/classes/FormatText/FTO.src/M000008.html +63 -0
  31. data/doc/created.rid +1 -0
  32. data/doc/files/fto_rb.html +141 -0
  33. data/doc/files/lib/fto_rb.html +150 -0
  34. data/doc/fr_class_index.html +30 -0
  35. data/doc/fr_file_index.html +27 -0
  36. data/doc/fr_method_index.html +39 -0
  37. data/doc/index.html +24 -0
  38. data/doc/rdoc-style.css +208 -0
  39. data/lib/fto.rb +1349 -0
  40. data/test/test_fto_api.rb +143 -0
  41. data/test/test_fto_effectors.rb +440 -0
  42. data/test/test_helper.rb +3 -0
  43. metadata +115 -0
@@ -0,0 +1,38 @@
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::Effector)</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 fto.rb, line 216</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-comment cmt">#</span>
16
+ <span class="ruby-comment cmt"># Set up defaults</span>
17
+ <span class="ruby-comment cmt">#</span>
18
+ (<span class="ruby-ivar">@name</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>, <span class="ruby-ivar">@signbit</span>,
19
+ <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>
20
+ <span class="ruby-ivar">@data</span> = []
21
+ <span class="ruby-ivar">@fill</span> = <span class="ruby-value str">' '</span>
22
+ <span class="ruby-ivar">@justify</span> = <span class="ruby-identifier">:left</span>
23
+ <span class="ruby-comment cmt">#</span>
24
+ <span class="ruby-comment cmt"># We can either handle an order-dependent list of arguments,</span>
25
+ <span class="ruby-comment cmt"># or a hash representing keyword arguments.</span>
26
+ <span class="ruby-comment cmt">#</span>
27
+ <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>
28
+ <span class="ruby-keyword kw">case</span> <span class="ruby-identifier">args</span>.<span class="ruby-identifier">class</span>
29
+ <span class="ruby-keyword kw">when</span> <span class="ruby-constant">Array</span>
30
+ (<span class="ruby-ivar">@name</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>, <span class="ruby-ivar">@signbit</span>,
31
+ <span class="ruby-ivar">@dWidth</span>, <span class="ruby-ivar">@fill</span>, <span class="ruby-ivar">@justify</span>, <span class="ruby-ivar">@truncate</span>, <span class="ruby-ivar">@data</span>) = <span class="ruby-identifier">args</span>
32
+ <span class="ruby-keyword kw">when</span> <span class="ruby-constant">Hash</span>
33
+ <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">&quot;@{key.to_s} = val&quot;</span>) }
34
+ <span class="ruby-keyword kw">end</span>
35
+ <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>))
36
+ <span class="ruby-keyword kw">end</span></pre>
37
+ </body>
38
+ </html>
@@ -0,0 +1,39 @@
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::Effector)</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 423</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-comment cmt">#</span>
16
+ <span class="ruby-comment cmt"># Set up defaults</span>
17
+ <span class="ruby-comment cmt">#</span>
18
+ (<span class="ruby-ivar">@name</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>, <span class="ruby-ivar">@signbit</span>,
19
+ <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>
20
+ <span class="ruby-ivar">@priority</span> = <span class="ruby-value">1000</span>
21
+ <span class="ruby-ivar">@data</span> = []
22
+ <span class="ruby-ivar">@fill</span> = <span class="ruby-value str">' '</span>
23
+ <span class="ruby-ivar">@justify</span> = <span class="ruby-identifier">:left</span>
24
+ <span class="ruby-comment cmt">#</span>
25
+ <span class="ruby-comment cmt"># We can either handle an order-dependent list of arguments,</span>
26
+ <span class="ruby-comment cmt"># or a hash representing keyword arguments.</span>
27
+ <span class="ruby-comment cmt">#</span>
28
+ <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>
29
+ <span class="ruby-keyword kw">case</span> <span class="ruby-identifier">args</span>.<span class="ruby-identifier">class</span>
30
+ <span class="ruby-keyword kw">when</span> <span class="ruby-constant">Array</span>
31
+ (<span class="ruby-ivar">@name</span>, <span class="ruby-ivar">@priority</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>,
32
+ <span class="ruby-ivar">@signbit</span>, <span class="ruby-ivar">@dWidth</span>, <span class="ruby-ivar">@fill</span>, <span class="ruby-ivar">@justify</span>, <span class="ruby-ivar">@truncate</span>, <span class="ruby-ivar">@data</span>) = <span class="ruby-identifier">args</span>
33
+ <span class="ruby-keyword kw">when</span> <span class="ruby-constant">Hash</span>
34
+ <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">&quot;@{key.to_s} = val&quot;</span>) }
35
+ <span class="ruby-keyword kw">end</span>
36
+ <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>))
37
+ <span class="ruby-keyword kw">end</span></pre>
38
+ </body>
39
+ </html>
@@ -0,0 +1,38 @@
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::Effector)</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 fto.rb, line 176</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-comment cmt">#</span>
16
+ <span class="ruby-comment cmt"># Set up defaults</span>
17
+ <span class="ruby-comment cmt">#</span>
18
+ (<span class="ruby-ivar">@name</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>, <span class="ruby-ivar">@signbit</span>,
19
+ <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>
20
+ <span class="ruby-ivar">@data</span> = []
21
+ <span class="ruby-ivar">@fill</span> = <span class="ruby-value str">' '</span>
22
+ <span class="ruby-ivar">@justify</span> = <span class="ruby-identifier">:left</span>
23
+ <span class="ruby-comment cmt">#</span>
24
+ <span class="ruby-comment cmt"># We can either handle an order-dependent list of arguments,</span>
25
+ <span class="ruby-comment cmt"># or a hash representing keyword arguments.</span>
26
+ <span class="ruby-comment cmt">#</span>
27
+ <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>
28
+ <span class="ruby-keyword kw">case</span> <span class="ruby-identifier">args</span>.<span class="ruby-identifier">class</span>
29
+ <span class="ruby-keyword kw">when</span> <span class="ruby-constant">Array</span>
30
+ (<span class="ruby-ivar">@name</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>, <span class="ruby-ivar">@signbit</span>,
31
+ <span class="ruby-ivar">@dWidth</span>, <span class="ruby-ivar">@fill</span>, <span class="ruby-ivar">@justify</span>, <span class="ruby-ivar">@truncate</span>, <span class="ruby-ivar">@data</span>) = <span class="ruby-identifier">args</span>
32
+ <span class="ruby-keyword kw">when</span> <span class="ruby-constant">Hash</span>
33
+ <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">&quot;@{key.to_s} = val&quot;</span>) }
34
+ <span class="ruby-keyword kw">end</span>
35
+ <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>))
36
+ <span class="ruby-keyword kw">end</span></pre>
37
+ </body>
38
+ </html>
@@ -0,0 +1,42 @@
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::Effector)</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 463</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">@code</span>, <span class="ruby-ivar">@reMatch</span>, <span class="ruby-ivar">@reExtra</span>, <span class="ruby-ivar">@mask</span>, <span class="ruby-ivar">@signbit</span>,
21
+ <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,</span>
29
+ <span class="ruby-comment cmt"># or 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">@enabled</span>, <span class="ruby-ivar">@priority</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>,
35
+ <span class="ruby-ivar">@signbit</span>, <span class="ruby-ivar">@dWidth</span>, <span class="ruby-ivar">@fill</span>, <span class="ruby-ivar">@justify</span>, <span class="ruby-ivar">@truncate</span>, <span class="ruby-ivar">@data</span>) = <span class="ruby-identifier">args</span>
36
+ <span class="ruby-keyword kw">when</span> <span class="ruby-constant">Hash</span>
37
+ <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">&quot;@{key.to_s} = val&quot;</span>) }
38
+ <span class="ruby-keyword kw">end</span>
39
+ <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>))
40
+ <span class="ruby-keyword kw">end</span></pre>
41
+ </body>
42
+ </html>
@@ -0,0 +1,43 @@
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::Effector)</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 589</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">&quot;@{key.to_s} = val&quot;</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>))
41
+ <span class="ruby-keyword kw">end</span></pre>
42
+ </body>
43
+ </html>
@@ -0,0 +1,19 @@
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>disable (FormatText::Effector)</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 627</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>()
17
+ <span class="ruby-keyword kw">end</span></pre>
18
+ </body>
19
+ </html>
@@ -0,0 +1,18 @@
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>disabled? (FormatText::Effector)</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 640</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>
16
+ <span class="ruby-keyword kw">end</span></pre>
17
+ </body>
18
+ </html>
@@ -0,0 +1,19 @@
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>enable (FormatText::Effector)</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 652</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>()
17
+ <span class="ruby-keyword kw">end</span></pre>
18
+ </body>
19
+ </html>
@@ -0,0 +1,18 @@
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>enabled? (FormatText::Effector)</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 665</span>
14
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">enabled?</span>()
15
+ <span class="ruby-ivar">@enabled</span>
16
+ <span class="ruby-keyword kw">end</span></pre>
17
+ </body>
18
+ </html>
@@ -0,0 +1,18 @@
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>enabled? (FormatText::Effector)</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 616</span>
14
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">enabled?</span>()
15
+ <span class="ruby-ivar">@enabled</span>
16
+ <span class="ruby-keyword kw">end</span></pre>
17
+ </body>
18
+ </html>
@@ -0,0 +1,305 @@
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::FTO</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::FTO</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
+ String
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
+ <h1>Description</h1>
83
+ <p>
84
+ The <em><a href="FTO.html">FTO</a></em> class is the user interface; all
85
+ others are for developers modifying or extending the <tt>fto</tt> library.
86
+ </p>
87
+ <p>
88
+ <em><a href="FTO.html">FTO</a></em> is a subclass of <em>String</em>, so
89
+ all <em>String</em> methods work on an <em><a href="FTO.html">FTO</a></em>
90
+ object. <em><a href="FTO.html">FTO</a></em> provides the additional <em><a
91
+ href="FTO.html#M000007">format</a>()</em> method.
92
+ </p>
93
+ <p>
94
+ In addition to string text, the constructor (<em><a
95
+ href="FTO.html#M000001">FTO.new</a></em>) can take more than a single
96
+ argument. Additional arguments will be stored as part of the object and
97
+ will be available to the <em><a
98
+ href="FTO.html#M000007">FTO#format</a>()</em> method at runtime.
99
+ </p>
100
+ <p>
101
+ An <em><a href="FTO.html">FTO</a></em> object can be created as just a
102
+ formatting string, or the constructor invocation can also include values to
103
+ be applied by the <em><a href="FTO.html#M000007">FTO#format</a>()</em>
104
+ method. At runtime the <em><a href="FTO.html#M000007">format</a>()</em>
105
+ method can override any argument list provided at instantiation, but the
106
+ latter is not lost.
107
+ </p>
108
+
109
+ </div>
110
+
111
+
112
+ </div>
113
+
114
+ <div id="method-list">
115
+ <h3 class="section-bar">Methods</h3>
116
+
117
+ <div class="name-list">
118
+ <a href="#M000004">destroyEffector</a>&nbsp;&nbsp;
119
+ <a href="#M000005">disableEffector</a>&nbsp;&nbsp;
120
+ <a href="#M000003">enableEffector</a>&nbsp;&nbsp;
121
+ <a href="#M000006">findEffectors</a>&nbsp;&nbsp;
122
+ <a href="#M000007">format</a>&nbsp;&nbsp;
123
+ <a href="#M000001">new</a>&nbsp;&nbsp;
124
+ <a href="#M000002">registerEffector</a>&nbsp;&nbsp;
125
+ </div>
126
+ </div>
127
+
128
+ </div>
129
+
130
+
131
+ <!-- if includes -->
132
+
133
+ <div id="section">
134
+
135
+
136
+
137
+
138
+
139
+
140
+
141
+
142
+ <!-- if method_list -->
143
+ <div id="methods">
144
+ <h3 class="section-bar">Public Class methods</h3>
145
+
146
+ <div id="method-M000004" class="method-detail">
147
+ <a name="M000004"></a>
148
+
149
+ <div class="method-heading">
150
+ <a href="FTO.src/M000004.html" target="Code" class="method-signature"
151
+ onclick="popupCode('FTO.src/M000004.html');return false;">
152
+ <span class="method-name">FTO.destroyEffector<i>(Fixnum)</i> => <i>nil</i><br />
153
+ </span>
154
+ </a>
155
+ </div>
156
+
157
+ <div class="method-description">
158
+ <p>
159
+ Completely removes the effector with the specified ID from the <a
160
+ href="FTO.html">FTO</a> system. &lt;strong&gt;THIS IS NOT
161
+ REVERSIBLE!&lt;/strong&gt;
162
+ </p>
163
+ </div>
164
+ </div>
165
+
166
+ <div id="method-M000005" class="method-detail">
167
+ <a name="M000005"></a>
168
+
169
+ <div class="method-heading">
170
+ <a href="FTO.src/M000005.html" target="Code" class="method-signature"
171
+ onclick="popupCode('FTO.src/M000005.html');return false;">
172
+ <span class="method-name">FTO.disableEffector<i>(Fixnum)</i> => <i>nil</i><br />
173
+ </span>
174
+ </a>
175
+ </div>
176
+
177
+ <div class="method-description">
178
+ <p>
179
+ Disables the effector with the specified ID (such as from <em><a
180
+ href="FTO.html#M000006">FTO.findEffectors</a>()</em>). This is a no-op if
181
+ the effector is already disabled.
182
+ </p>
183
+ </div>
184
+ </div>
185
+
186
+ <div id="method-M000003" class="method-detail">
187
+ <a name="M000003"></a>
188
+
189
+ <div class="method-heading">
190
+ <a href="FTO.src/M000003.html" target="Code" class="method-signature"
191
+ onclick="popupCode('FTO.src/M000003.html');return false;">
192
+ <span class="method-name">FTO.enableEffector<i>(Fixnum)</i> => <i>nil</i><br />
193
+ </span>
194
+ </a>
195
+ </div>
196
+
197
+ <div class="method-description">
198
+ <p>
199
+ Enables the effector with the specified ID (found in the effector&#8216;s
200
+ <em>id</em> attribute). This is a no-op if the effector is already enabled.
201
+ </p>
202
+ </div>
203
+ </div>
204
+
205
+ <div id="method-M000006" class="method-detail">
206
+ <a name="M000006"></a>
207
+
208
+ <div class="method-heading">
209
+ <a href="FTO.src/M000006.html" target="Code" class="method-signature"
210
+ onclick="popupCode('FTO.src/M000006.html');return false;">
211
+ <span class="method-name">FTO.findEffectors<i>(String)</i> => <i>Array</i><br />
212
+ FTO.findEffectors<i>(Regexp)</i> => <i>Array</i><br />
213
+ </span>
214
+ </a>
215
+ </div>
216
+
217
+ <div class="method-description">
218
+ <p>
219
+ Returns an array of registered effectors whose names (<em>name</em>
220
+ attribute) match the specified pattern.
221
+ </p>
222
+ </div>
223
+ </div>
224
+
225
+ <div id="method-M000001" class="method-detail">
226
+ <a name="M000001"></a>
227
+
228
+ <div class="method-heading">
229
+ <a href="FTO.src/M000001.html" target="Code" class="method-signature"
230
+ onclick="popupCode('FTO.src/M000001.html');return false;">
231
+ <span class="method-name">new<i>()</i> => <i>FTO object</i><br />
232
+ new<i>(String)</i> => <i>FTO object</i><br />
233
+ new<i>(String, arg [, ...])</i> => <i>FTO object</i><br />
234
+ </span>
235
+ </a>
236
+ </div>
237
+
238
+ <div class="method-description">
239
+ <p>
240
+ Any argument list is supplied at object instantiation can be temporarily
241
+ overridden when the <em><a href="FTO.html#M000007">FTO#format</a>()</em>
242
+ method is invoked.
243
+ </p>
244
+ </div>
245
+ </div>
246
+
247
+ <div id="method-M000002" class="method-detail">
248
+ <a name="M000002"></a>
249
+
250
+ <div class="method-heading">
251
+ <a href="FTO.src/M000002.html" target="Code" class="method-signature"
252
+ onclick="popupCode('FTO.src/M000002.html');return false;">
253
+ <span class="method-name">FTO.registerEffector<i>(FormatText::Effector)</i> => <i>nil</i><br />
254
+ FTO.registerEffector<i>({ :symattr => value [, ...] })</i> => <i>nil</i><br />
255
+ </span>
256
+ </a>
257
+ </div>
258
+
259
+ <div class="method-description">
260
+ <p>
261
+ Add an effector description to the list of those which will be processed by
262
+ the <em><a href="FTO.html#M000007">FTO#format</a>()</em> method.
263
+ </p>
264
+ </div>
265
+ </div>
266
+
267
+ <h3 class="section-bar">Public Instance methods</h3>
268
+
269
+ <div id="method-M000007" class="method-detail">
270
+ <a name="M000007"></a>
271
+
272
+ <div class="method-heading">
273
+ <a href="FTO.src/M000007.html" target="Code" class="method-signature"
274
+ onclick="popupCode('FTO.src/M000007.html');return false;">
275
+ <span class="method-name">format<i>()</i> => <i>String</i><br />
276
+ format<i>(arg [, ...])</i> => <i>String</i><br />
277
+ format<i>(Array)</i> => <i>String</i><br />
278
+ format<i>(FormatText::Context)</i> => <i>String</i> (<u>internal use only</u>)<br />
279
+ </span>
280
+ </a>
281
+ </div>
282
+
283
+ <div class="method-description">
284
+ <p>
285
+ Process the formatting string, optionally with a runtime argument list. The
286
+ argument list can either be a list of values, an array of values, or an
287
+ <em><a href="Context.html">FormatText::Context</a></em> object. (The latter
288
+ is intended only for internal use with recursion.)
289
+ </p>
290
+ </div>
291
+ </div>
292
+
293
+
294
+ </div>
295
+
296
+
297
+ </div>
298
+
299
+
300
+ <div id="validator-badges">
301
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
302
+ </div>
303
+
304
+ </body>
305
+ </html>