markaby 0.2 → 0.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (57) hide show
  1. data/README +189 -0
  2. data/Rakefile +15 -0
  3. data/doc/rdoc/classes/Markaby.html +192 -0
  4. data/doc/rdoc/classes/Markaby/ActionControllerHelper.html +145 -0
  5. data/doc/rdoc/classes/Markaby/ActionControllerHelper.src/M000005.html +20 -0
  6. data/doc/rdoc/classes/Markaby/Builder.html +480 -0
  7. data/doc/rdoc/classes/Markaby/Builder.src/M000008.html +44 -0
  8. data/doc/rdoc/classes/Markaby/Builder.src/M000009.html +18 -0
  9. data/doc/rdoc/classes/Markaby/Builder.src/M000010.html +19 -0
  10. data/doc/rdoc/classes/Markaby/Builder.src/M000012.html +24 -0
  11. data/doc/rdoc/classes/Markaby/Builder.src/M000013.html +18 -0
  12. data/doc/rdoc/classes/Markaby/Builder.src/M000014.html +22 -0
  13. data/doc/rdoc/classes/Markaby/Builder.src/M000015.html +38 -0
  14. data/doc/rdoc/classes/Markaby/Builder.src/M000016.html +18 -0
  15. data/doc/rdoc/classes/Markaby/Builder.src/M000017.html +18 -0
  16. data/doc/rdoc/classes/Markaby/Builder.src/M000018.html +21 -0
  17. data/doc/rdoc/classes/Markaby/Builder.src/M000019.html +24 -0
  18. data/doc/rdoc/classes/Markaby/Builder.src/M000021.html +18 -0
  19. data/doc/rdoc/classes/Markaby/CssProxy.html +177 -0
  20. data/doc/rdoc/classes/Markaby/CssProxy.src/M000006.html +19 -0
  21. data/doc/rdoc/classes/Markaby/CssProxy.src/M000007.html +33 -0
  22. data/doc/rdoc/classes/Markaby/Template.html +156 -0
  23. data/doc/rdoc/classes/Markaby/Template.src/M000022.html +18 -0
  24. data/doc/rdoc/classes/Markaby/Template.src/M000023.html +20 -0
  25. data/doc/rdoc/classes/Markaby/View.html +156 -0
  26. data/doc/rdoc/classes/Markaby/View.src/M000024.html +18 -0
  27. data/doc/rdoc/classes/Markaby/View.src/M000025.html +18 -0
  28. data/doc/rdoc/classes/Object.html +199 -0
  29. data/doc/rdoc/classes/Object.src/M000001.html +16 -0
  30. data/doc/rdoc/classes/Object.src/M000002.html +16 -0
  31. data/doc/rdoc/classes/Object.src/M000003.html +18 -0
  32. data/doc/rdoc/classes/Object.src/M000004.html +18 -0
  33. data/doc/rdoc/created.rid +1 -0
  34. data/doc/rdoc/files/CHANGELOG.html +136 -0
  35. data/doc/rdoc/files/README.html +326 -0
  36. data/doc/rdoc/files/lib/markaby/builder_rb.html +101 -0
  37. data/doc/rdoc/files/lib/markaby/cssproxy_rb.html +101 -0
  38. data/doc/rdoc/files/lib/markaby/helper_rb.html +101 -0
  39. data/doc/rdoc/files/lib/markaby/metaid_rb.html +107 -0
  40. data/doc/rdoc/files/lib/markaby/tags_rb.html +101 -0
  41. data/doc/rdoc/files/lib/markaby/template_rb.html +101 -0
  42. data/doc/rdoc/files/lib/markaby/view_rb.html +101 -0
  43. data/doc/rdoc/files/lib/markaby_rb.html +127 -0
  44. data/doc/rdoc/fr_class_index.html +33 -0
  45. data/doc/rdoc/fr_file_index.html +36 -0
  46. data/doc/rdoc/fr_method_index.html +51 -0
  47. data/doc/rdoc/index.html +24 -0
  48. data/doc/rdoc/rdoc-style.css +208 -0
  49. data/lib/markaby.rb +19 -1
  50. data/lib/markaby/builder.rb +106 -28
  51. data/lib/markaby/cssproxy.rb +9 -0
  52. data/lib/markaby/helper.rb +14 -0
  53. data/lib/markaby/tags.rb +3 -19
  54. data/setup.rb +1551 -0
  55. data/test/test_markaby.rb +53 -0
  56. data/tools/rakehelp.rb +100 -0
  57. metadata +103 -35
@@ -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>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>
@@ -0,0 +1,33 @@
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>
@@ -0,0 +1,156 @@
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>
@@ -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>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>
@@ -0,0 +1,20 @@
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>
@@ -0,0 +1,156 @@
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>
@@ -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>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>
@@ -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>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>