markaby 0.3 → 0.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (53) hide show
  1. data/Rakefile +1 -1
  2. data/lib/markaby.rb +2 -2
  3. data/lib/markaby/builder.rb +57 -33
  4. data/lib/markaby/tags.rb +1 -0
  5. data/test/test_markaby.rb +21 -16
  6. metadata +4 -63
  7. data/doc/rdoc/classes/Markaby.html +0 -192
  8. data/doc/rdoc/classes/Markaby/ActionControllerHelper.html +0 -145
  9. data/doc/rdoc/classes/Markaby/ActionControllerHelper.src/M000005.html +0 -20
  10. data/doc/rdoc/classes/Markaby/Builder.html +0 -480
  11. data/doc/rdoc/classes/Markaby/Builder.src/M000008.html +0 -44
  12. data/doc/rdoc/classes/Markaby/Builder.src/M000009.html +0 -18
  13. data/doc/rdoc/classes/Markaby/Builder.src/M000010.html +0 -19
  14. data/doc/rdoc/classes/Markaby/Builder.src/M000012.html +0 -24
  15. data/doc/rdoc/classes/Markaby/Builder.src/M000013.html +0 -18
  16. data/doc/rdoc/classes/Markaby/Builder.src/M000014.html +0 -22
  17. data/doc/rdoc/classes/Markaby/Builder.src/M000015.html +0 -38
  18. data/doc/rdoc/classes/Markaby/Builder.src/M000016.html +0 -18
  19. data/doc/rdoc/classes/Markaby/Builder.src/M000017.html +0 -18
  20. data/doc/rdoc/classes/Markaby/Builder.src/M000018.html +0 -21
  21. data/doc/rdoc/classes/Markaby/Builder.src/M000019.html +0 -24
  22. data/doc/rdoc/classes/Markaby/Builder.src/M000021.html +0 -18
  23. data/doc/rdoc/classes/Markaby/CssProxy.html +0 -177
  24. data/doc/rdoc/classes/Markaby/CssProxy.src/M000006.html +0 -19
  25. data/doc/rdoc/classes/Markaby/CssProxy.src/M000007.html +0 -33
  26. data/doc/rdoc/classes/Markaby/Template.html +0 -156
  27. data/doc/rdoc/classes/Markaby/Template.src/M000022.html +0 -18
  28. data/doc/rdoc/classes/Markaby/Template.src/M000023.html +0 -20
  29. data/doc/rdoc/classes/Markaby/View.html +0 -156
  30. data/doc/rdoc/classes/Markaby/View.src/M000024.html +0 -18
  31. data/doc/rdoc/classes/Markaby/View.src/M000025.html +0 -18
  32. data/doc/rdoc/classes/Object.html +0 -199
  33. data/doc/rdoc/classes/Object.src/M000001.html +0 -16
  34. data/doc/rdoc/classes/Object.src/M000002.html +0 -16
  35. data/doc/rdoc/classes/Object.src/M000003.html +0 -18
  36. data/doc/rdoc/classes/Object.src/M000004.html +0 -18
  37. data/doc/rdoc/created.rid +0 -1
  38. data/doc/rdoc/files/CHANGELOG.html +0 -136
  39. data/doc/rdoc/files/README.html +0 -326
  40. data/doc/rdoc/files/lib/markaby/builder_rb.html +0 -101
  41. data/doc/rdoc/files/lib/markaby/cssproxy_rb.html +0 -101
  42. data/doc/rdoc/files/lib/markaby/helper_rb.html +0 -101
  43. data/doc/rdoc/files/lib/markaby/metaid_rb.html +0 -107
  44. data/doc/rdoc/files/lib/markaby/tags_rb.html +0 -101
  45. data/doc/rdoc/files/lib/markaby/template_rb.html +0 -101
  46. data/doc/rdoc/files/lib/markaby/view_rb.html +0 -101
  47. data/doc/rdoc/files/lib/markaby_rb.html +0 -127
  48. data/doc/rdoc/fr_class_index.html +0 -33
  49. data/doc/rdoc/fr_file_index.html +0 -36
  50. data/doc/rdoc/fr_method_index.html +0 -51
  51. data/doc/rdoc/index.html +0 -24
  52. data/doc/rdoc/rdoc-style.css +0 -208
  53. data/test/example.rb +0 -48
@@ -1,19 +0,0 @@
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 (Markaby::CssProxy)</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/markaby/cssproxy.rb, line 10</span>
14
- 10: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">opts</span> = {}, <span class="ruby-operator">&amp;</span><span class="ruby-identifier">blk</span>)
15
- 11: <span class="ruby-ivar">@opts</span> = <span class="ruby-identifier">opts</span>
16
- 12: <span class="ruby-ivar">@blk</span> = <span class="ruby-identifier">blk</span>
17
- 13: <span class="ruby-keyword kw">end</span></pre>
18
- </body>
19
- </html>
@@ -1,33 +0,0 @@
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>method_missing (Markaby::CssProxy)</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/markaby/cssproxy.rb, line 18</span>
14
- 18: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">method_missing</span>(<span class="ruby-identifier">id_or_class</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">args</span>, <span class="ruby-operator">&amp;</span><span class="ruby-identifier">blk</span>)
15
- 19: <span class="ruby-identifier">idc</span> = <span class="ruby-identifier">id_or_class</span>.<span class="ruby-identifier">to_s</span>
16
- 20: <span class="ruby-keyword kw">case</span> <span class="ruby-identifier">idc</span>
17
- 21: <span class="ruby-keyword kw">when</span> <span class="ruby-regexp re">/!$/</span>
18
- 22: <span class="ruby-ivar">@opts</span>[<span class="ruby-identifier">:id</span>] = <span class="ruby-identifier">$`</span>
19
- 23: <span class="ruby-keyword kw">else</span>
20
- 24: <span class="ruby-ivar">@opts</span>[<span class="ruby-identifier">:class</span>] = <span class="ruby-node">&quot;#{@opts[:class]} #{idc}&quot;</span>.<span class="ruby-identifier">strip</span>
21
- 25: <span class="ruby-keyword kw">end</span>
22
- 26: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">args</span>.<span class="ruby-identifier">empty?</span> <span class="ruby-keyword kw">and</span> <span class="ruby-identifier">blk</span>.<span class="ruby-identifier">nil?</span>
23
- 27: <span class="ruby-keyword kw">self</span>
24
- 28: <span class="ruby-keyword kw">else</span>
25
- 29: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">args</span>.<span class="ruby-identifier">last</span>.<span class="ruby-identifier">respond_to?</span> <span class="ruby-identifier">:to_hash</span>
26
- 30: <span class="ruby-ivar">@opts</span>.<span class="ruby-identifier">merge!</span>(<span class="ruby-identifier">args</span>.<span class="ruby-identifier">pop</span>.<span class="ruby-identifier">to_hash</span>)
27
- 31: <span class="ruby-keyword kw">end</span>
28
- 32: <span class="ruby-identifier">args</span>.<span class="ruby-identifier">push</span> <span class="ruby-ivar">@opts</span>
29
- 33: <span class="ruby-ivar">@blk</span>.<span class="ruby-identifier">call</span>(<span class="ruby-identifier">args</span>, <span class="ruby-identifier">blk</span>)
30
- 34: <span class="ruby-keyword kw">end</span>
31
- 35: <span class="ruby-keyword kw">end</span></pre>
32
- </body>
33
- </html>
@@ -1,156 +0,0 @@
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: Markaby::Template</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">Markaby::Template</td>
54
- </tr>
55
- <tr class="top-aligned-row">
56
- <td><strong>In:</strong></td>
57
- <td>
58
- <a href="../../files/lib/markaby/template_rb.html">
59
- lib/markaby/template.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
- <a href="../Object.html">
69
- Object
70
- </a>
71
- </td>
72
- </tr>
73
- </table>
74
- </div>
75
- <!-- banner header -->
76
-
77
- <div id="bodyContent">
78
-
79
-
80
-
81
- <div id="contextContent">
82
-
83
-
84
-
85
- </div>
86
-
87
- <div id="method-list">
88
- <h3 class="section-bar">Methods</h3>
89
-
90
- <div class="name-list">
91
- <a href="#M000022">new</a>&nbsp;&nbsp;
92
- <a href="#M000023">render</a>&nbsp;&nbsp;
93
- </div>
94
- </div>
95
-
96
- </div>
97
-
98
-
99
- <!-- if includes -->
100
-
101
- <div id="section">
102
-
103
-
104
-
105
-
106
-
107
-
108
-
109
-
110
- <!-- if method_list -->
111
- <div id="methods">
112
- <h3 class="section-bar">Public Class methods</h3>
113
-
114
- <div id="method-M000022" class="method-detail">
115
- <a name="M000022"></a>
116
-
117
- <div class="method-heading">
118
- <a href="Template.src/M000022.html" target="Code" class="method-signature"
119
- onclick="popupCode('Template.src/M000022.html');return false;">
120
- <span class="method-name">new</span><span class="method-args">(template)</span>
121
- </a>
122
- </div>
123
-
124
- <div class="method-description">
125
- </div>
126
- </div>
127
-
128
- <h3 class="section-bar">Public Instance methods</h3>
129
-
130
- <div id="method-M000023" class="method-detail">
131
- <a name="M000023"></a>
132
-
133
- <div class="method-heading">
134
- <a href="Template.src/M000023.html" target="Code" class="method-signature"
135
- onclick="popupCode('Template.src/M000023.html');return false;">
136
- <span class="method-name">render</span><span class="method-args">(*args)</span>
137
- </a>
138
- </div>
139
-
140
- <div class="method-description">
141
- </div>
142
- </div>
143
-
144
-
145
- </div>
146
-
147
-
148
- </div>
149
-
150
-
151
- <div id="validator-badges">
152
- <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
153
- </div>
154
-
155
- </body>
156
- </html>
@@ -1,18 +0,0 @@
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 (Markaby::Template)</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/markaby/template.rb, line 3</span>
14
- 3: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">template</span>)
15
- 4: <span class="ruby-ivar">@template</span> = <span class="ruby-identifier">template</span>
16
- 5: <span class="ruby-keyword kw">end</span></pre>
17
- </body>
18
- </html>
@@ -1,20 +0,0 @@
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>render (Markaby::Template)</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/markaby/template.rb, line 6</span>
14
- 6: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">render</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">args</span>)
15
- 7: <span class="ruby-identifier">output</span> = <span class="ruby-constant">Builder</span>.<span class="ruby-identifier">new</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">args</span>)
16
- 8: <span class="ruby-identifier">output</span>.<span class="ruby-identifier">instance_eval</span> <span class="ruby-ivar">@template</span>
17
- 9: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">output</span>.<span class="ruby-identifier">to_s</span>
18
- 10: <span class="ruby-keyword kw">end</span></pre>
19
- </body>
20
- </html>
@@ -1,156 +0,0 @@
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: Markaby::View</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">Markaby::View</td>
54
- </tr>
55
- <tr class="top-aligned-row">
56
- <td><strong>In:</strong></td>
57
- <td>
58
- <a href="../../files/lib/markaby/view_rb.html">
59
- lib/markaby/view.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
- <a href="../Object.html">
69
- Object
70
- </a>
71
- </td>
72
- </tr>
73
- </table>
74
- </div>
75
- <!-- banner header -->
76
-
77
- <div id="bodyContent">
78
-
79
-
80
-
81
- <div id="contextContent">
82
-
83
-
84
-
85
- </div>
86
-
87
- <div id="method-list">
88
- <h3 class="section-bar">Methods</h3>
89
-
90
- <div class="name-list">
91
- <a href="#M000024">new</a>&nbsp;&nbsp;
92
- <a href="#M000025">render</a>&nbsp;&nbsp;
93
- </div>
94
- </div>
95
-
96
- </div>
97
-
98
-
99
- <!-- if includes -->
100
-
101
- <div id="section">
102
-
103
-
104
-
105
-
106
-
107
-
108
-
109
-
110
- <!-- if method_list -->
111
- <div id="methods">
112
- <h3 class="section-bar">Public Class methods</h3>
113
-
114
- <div id="method-M000024" class="method-detail">
115
- <a name="M000024"></a>
116
-
117
- <div class="method-heading">
118
- <a href="View.src/M000024.html" target="Code" class="method-signature"
119
- onclick="popupCode('View.src/M000024.html');return false;">
120
- <span class="method-name">new</span><span class="method-args">(action_view)</span>
121
- </a>
122
- </div>
123
-
124
- <div class="method-description">
125
- </div>
126
- </div>
127
-
128
- <h3 class="section-bar">Public Instance methods</h3>
129
-
130
- <div id="method-M000025" class="method-detail">
131
- <a name="M000025"></a>
132
-
133
- <div class="method-heading">
134
- <a href="View.src/M000025.html" target="Code" class="method-signature"
135
- onclick="popupCode('View.src/M000025.html');return false;">
136
- <span class="method-name">render</span><span class="method-args">(template, local_assigns = {})</span>
137
- </a>
138
- </div>
139
-
140
- <div class="method-description">
141
- </div>
142
- </div>
143
-
144
-
145
- </div>
146
-
147
-
148
- </div>
149
-
150
-
151
- <div id="validator-badges">
152
- <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
153
- </div>
154
-
155
- </body>
156
- </html>
@@ -1,18 +0,0 @@
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 (Markaby::View)</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/markaby/view.rb, line 3</span>
14
- 3: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">action_view</span>)
15
- 4: <span class="ruby-ivar">@action_view</span> = <span class="ruby-identifier">action_view</span>
16
- 5: <span class="ruby-keyword kw">end</span></pre>
17
- </body>
18
- </html>
@@ -1,18 +0,0 @@
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>render (Markaby::View)</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/markaby/view.rb, line 6</span>
14
- 6: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">render</span>(<span class="ruby-identifier">template</span>, <span class="ruby-identifier">local_assigns</span> = {})
15
- 7: <span class="ruby-constant">Template</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">template</span>).<span class="ruby-identifier">render</span>(<span class="ruby-ivar">@action_view</span>.<span class="ruby-identifier">assigns</span>.<span class="ruby-identifier">merge</span>(<span class="ruby-identifier">local_assigns</span>), <span class="ruby-ivar">@action_view</span>)
16
- 8: <span class="ruby-keyword kw">end</span></pre>
17
- </body>
18
- </html>