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,44 @@
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::Builder)</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/builder.rb, line 38</span>
14
+ 38: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">assigns</span> = {}, <span class="ruby-identifier">helpers</span> = <span class="ruby-keyword kw">nil</span>, <span class="ruby-operator">&amp;</span><span class="ruby-identifier">block</span>)
15
+ 39: <span class="ruby-ivar">@stream</span> = []
16
+ 40: <span class="ruby-ivar">@assigns</span> = <span class="ruby-identifier">assigns</span>
17
+ 41: <span class="ruby-ivar">@builder</span> = <span class="ruby-operator">::</span><span class="ruby-constant">Builder</span><span class="ruby-operator">::</span><span class="ruby-constant">XmlMarkup</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">:indent</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value">2</span>, <span class="ruby-identifier">:target</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-ivar">@stream</span>)
18
+ 42: <span class="ruby-ivar">@output_helpers</span> = <span class="ruby-keyword kw">true</span>
19
+ 43:
20
+ 44: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">helpers</span>.<span class="ruby-identifier">nil?</span>
21
+ 45: <span class="ruby-ivar">@helpers</span> = <span class="ruby-keyword kw">nil</span>
22
+ 46: <span class="ruby-keyword kw">else</span>
23
+ 47: <span class="ruby-ivar">@helpers</span> = <span class="ruby-identifier">helpers</span>.<span class="ruby-identifier">dup</span>
24
+ 48: <span class="ruby-keyword kw">for</span> <span class="ruby-identifier">iv</span> <span class="ruby-keyword kw">in</span> <span class="ruby-identifier">helpers</span>.<span class="ruby-identifier">instance_variables</span>
25
+ 49: <span class="ruby-identifier">instance_variable_set</span>(<span class="ruby-identifier">iv</span>, <span class="ruby-identifier">helpers</span>.<span class="ruby-identifier">instance_variable_get</span>(<span class="ruby-identifier">iv</span>))
26
+ 50: <span class="ruby-keyword kw">end</span>
27
+ 51: <span class="ruby-keyword kw">end</span>
28
+ 52:
29
+ 53: <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">assigns</span>.<span class="ruby-identifier">nil?</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">assigns</span>.<span class="ruby-identifier">empty?</span>
30
+ 54: <span class="ruby-keyword kw">for</span> <span class="ruby-identifier">iv</span>, <span class="ruby-identifier">val</span> <span class="ruby-keyword kw">in</span> <span class="ruby-identifier">assigns</span>
31
+ 55: <span class="ruby-identifier">instance_variable_set</span>(<span class="ruby-node">&quot;@#{iv}&quot;</span>, <span class="ruby-identifier">val</span>)
32
+ 56: <span class="ruby-keyword kw">unless</span> <span class="ruby-ivar">@helpers</span>.<span class="ruby-identifier">nil?</span>
33
+ 57: <span class="ruby-ivar">@helpers</span>.<span class="ruby-identifier">instance_variable_set</span>(<span class="ruby-node">&quot;@#{iv}&quot;</span>, <span class="ruby-identifier">val</span>)
34
+ 58: <span class="ruby-keyword kw">end</span>
35
+ 59: <span class="ruby-keyword kw">end</span>
36
+ 60: <span class="ruby-keyword kw">end</span>
37
+ 61:
38
+ 62: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">block</span>
39
+ 63: <span class="ruby-identifier">r</span> = <span class="ruby-identifier">instance_eval</span> <span class="ruby-operator">&amp;</span><span class="ruby-identifier">block</span>
40
+ 64: <span class="ruby-identifier">text</span>(<span class="ruby-identifier">r</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">to_s</span>.<span class="ruby-identifier">empty?</span>
41
+ 65: <span class="ruby-keyword kw">end</span>
42
+ 66: <span class="ruby-keyword kw">end</span></pre>
43
+ </body>
44
+ </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>to_s (Markaby::Builder)</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/builder.rb, line 69</span>
14
+ 69: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_s</span>
15
+ 70: <span class="ruby-ivar">@builder</span>.<span class="ruby-identifier">target!</span>.<span class="ruby-identifier">join</span>
16
+ 71: <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>text (Markaby::Builder)</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/builder.rb, line 74</span>
14
+ 74: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">text</span>(<span class="ruby-identifier">string</span>)
15
+ 75: <span class="ruby-ivar">@builder</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-node">&quot;#{string}&quot;</span>
16
+ 76: <span class="ruby-keyword kw">nil</span>
17
+ 77: <span class="ruby-keyword kw">end</span></pre>
18
+ </body>
19
+ </html>
@@ -0,0 +1,24 @@
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>capture (Markaby::Builder)</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/builder.rb, line 86</span>
14
+ 86: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">capture</span>(<span class="ruby-operator">&amp;</span><span class="ruby-identifier">block</span>)
15
+ 87: <span class="ruby-identifier">assigns</span> = <span class="ruby-identifier">instance_variables</span>.<span class="ruby-identifier">inject</span>({}) <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">hsh</span>, <span class="ruby-identifier">iv</span><span class="ruby-operator">|</span>
16
+ 88: <span class="ruby-keyword kw">unless</span> [<span class="ruby-value str">'@stream'</span>, <span class="ruby-value str">'@builder'</span>, <span class="ruby-value str">'@assigns'</span>, <span class="ruby-value str">'@helpers'</span>].<span class="ruby-identifier">include?</span>(<span class="ruby-identifier">iv</span>)
17
+ 89: <span class="ruby-identifier">hsh</span>[<span class="ruby-identifier">iv</span>[<span class="ruby-value">1</span><span class="ruby-operator">..</span><span class="ruby-value">-1</span>]] = <span class="ruby-identifier">instance_variable_get</span>(<span class="ruby-identifier">iv</span>)
18
+ 90: <span class="ruby-keyword kw">end</span>
19
+ 91: <span class="ruby-identifier">hsh</span>
20
+ 92: <span class="ruby-keyword kw">end</span>
21
+ 93: <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">class</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">assigns</span>, <span class="ruby-ivar">@helpers</span>, <span class="ruby-operator">&amp;</span><span class="ruby-identifier">block</span>).<span class="ruby-identifier">to_s</span>
22
+ 94: <span class="ruby-keyword kw">end</span></pre>
23
+ </body>
24
+ </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>content_for (Markaby::Builder)</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/builder.rb, line 109</span>
14
+ 109: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">content_for</span>(<span class="ruby-identifier">name</span>, <span class="ruby-operator">&amp;</span><span class="ruby-identifier">block</span>)
15
+ 110: <span class="ruby-identifier">eval</span> <span class="ruby-node">&quot;@content_for_#{name} = (@content_for_#{name} || '') + capture(&amp;block)&quot;</span>
16
+ 111: <span class="ruby-keyword kw">end</span></pre>
17
+ </body>
18
+ </html>
@@ -0,0 +1,22 @@
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>tag! (Markaby::Builder)</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/builder.rb, line 115</span>
14
+ 115: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">tag!</span>(<span class="ruby-identifier">tag</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">args</span>, <span class="ruby-operator">&amp;</span><span class="ruby-identifier">block</span>)
15
+ 116: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">block</span>
16
+ 117: <span class="ruby-identifier">str</span> = <span class="ruby-identifier">capture</span> <span class="ruby-operator">&amp;</span><span class="ruby-identifier">block</span>
17
+ 118: <span class="ruby-identifier">block</span> = <span class="ruby-identifier">proc</span> { <span class="ruby-identifier">text</span>(<span class="ruby-identifier">str</span>) }
18
+ 119: <span class="ruby-keyword kw">end</span>
19
+ 120: <span class="ruby-ivar">@builder</span>.<span class="ruby-identifier">method_missing</span>(<span class="ruby-identifier">tag</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">args</span>, <span class="ruby-operator">&amp;</span><span class="ruby-identifier">block</span>)
20
+ 121: <span class="ruby-keyword kw">end</span></pre>
21
+ </body>
22
+ </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>method_missing (Markaby::Builder)</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/builder.rb, line 138</span>
14
+ 138: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">method_missing</span>(<span class="ruby-identifier">sym</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">args</span>, <span class="ruby-operator">&amp;</span><span class="ruby-identifier">block</span>)
15
+ 139: <span class="ruby-identifier">args</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">arg</span><span class="ruby-operator">|</span>
16
+ 140: <span class="ruby-ivar">@stream</span>.<span class="ruby-identifier">delete_if</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">x</span><span class="ruby-operator">|</span> <span class="ruby-identifier">x</span>.<span class="ruby-identifier">object_id</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">arg</span>.<span class="ruby-identifier">object_id</span> }
17
+ 141: <span class="ruby-keyword kw">end</span>
18
+ 142: <span class="ruby-keyword kw">if</span> <span class="ruby-constant">TAGS</span>.<span class="ruby-identifier">include?</span>(<span class="ruby-identifier">sym</span>)
19
+ 143: <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">block</span>.<span class="ruby-identifier">nil?</span>
20
+ 144: <span class="ruby-keyword kw">return</span> <span class="ruby-constant">CssProxy</span>.<span class="ruby-identifier">new</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">args</span>, <span class="ruby-identifier">block</span><span class="ruby-operator">|</span>
21
+ 145: <span class="ruby-identifier">tag!</span>(<span class="ruby-identifier">sym</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">args</span>, <span class="ruby-operator">&amp;</span><span class="ruby-identifier">block</span>)
22
+ 146: <span class="ruby-keyword kw">end</span>
23
+ 147: <span class="ruby-keyword kw">end</span>
24
+ 148: <span class="ruby-identifier">tag!</span>(<span class="ruby-identifier">sym</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">args</span>, <span class="ruby-operator">&amp;</span><span class="ruby-identifier">block</span>)
25
+ 149: <span class="ruby-keyword kw">elsif</span> <span class="ruby-constant">SELF_CLOSING_TAGS</span>.<span class="ruby-identifier">include?</span>(<span class="ruby-identifier">sym</span>)
26
+ 150: <span class="ruby-identifier">tag!</span>(<span class="ruby-identifier">sym</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">args</span>)
27
+ 151: <span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">instance_variable_get</span>(<span class="ruby-node">&quot;@#{sym}&quot;</span>)
28
+ 152: <span class="ruby-identifier">instance_variable_get</span>(<span class="ruby-node">&quot;@#{sym}&quot;</span>)
29
+ 153: <span class="ruby-keyword kw">elsif</span> <span class="ruby-ivar">@helpers</span>.<span class="ruby-identifier">respond_to?</span>(<span class="ruby-identifier">sym</span>)
30
+ 154: <span class="ruby-identifier">r</span> = <span class="ruby-ivar">@helpers</span>.<span class="ruby-identifier">send</span>(<span class="ruby-identifier">sym</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">args</span>, <span class="ruby-operator">&amp;</span><span class="ruby-identifier">block</span>)
31
+ 155: <span class="ruby-ivar">@builder</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">r</span> <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@output_helpers</span>
32
+ 156: <span class="ruby-identifier">r</span>
33
+ 157: <span class="ruby-keyword kw">else</span>
34
+ 158: <span class="ruby-identifier">tag!</span>(<span class="ruby-identifier">sym</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">args</span>, <span class="ruby-operator">&amp;</span><span class="ruby-identifier">block</span>)
35
+ 159: <span class="ruby-keyword kw">end</span>
36
+ 160: <span class="ruby-keyword kw">end</span></pre>
37
+ </body>
38
+ </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>p (Markaby::Builder)</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/builder.rb, line 162</span>
14
+ 162: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">p</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">args</span>, <span class="ruby-operator">&amp;</span><span class="ruby-identifier">block</span>)
15
+ 163: <span class="ruby-identifier">method_missing</span>(<span class="ruby-identifier">:p</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">args</span>, <span class="ruby-operator">&amp;</span><span class="ruby-identifier">block</span>)
16
+ 164: <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>img (Markaby::Builder)</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/builder.rb, line 169</span>
14
+ 169: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">img</span>(<span class="ruby-identifier">opts</span> = {})
15
+ 170: <span class="ruby-identifier">tag!</span>(<span class="ruby-identifier">:img</span>, <span class="ruby-ivar">@@default_image_tag_options</span>.<span class="ruby-identifier">merge</span>(<span class="ruby-identifier">opts</span>))
16
+ 171: <span class="ruby-keyword kw">end</span></pre>
17
+ </body>
18
+ </html>
@@ -0,0 +1,21 @@
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>head (Markaby::Builder)</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/builder.rb, line 175</span>
14
+ 175: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">head</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">args</span>, <span class="ruby-operator">&amp;</span><span class="ruby-identifier">block</span>)
15
+ 176: <span class="ruby-identifier">tag!</span>(<span class="ruby-identifier">:head</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">args</span>) <span class="ruby-keyword kw">do</span>
16
+ 177: <span class="ruby-identifier">tag!</span>(<span class="ruby-identifier">:meta</span>, <span class="ruby-value str">'http-equiv'</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">'Content-Type'</span>, <span class="ruby-value str">'content'</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">'text/html; charset=utf-8'</span>)
17
+ 178: <span class="ruby-identifier">instance_eval</span> <span class="ruby-operator">&amp;</span><span class="ruby-identifier">block</span>
18
+ 179: <span class="ruby-keyword kw">end</span>
19
+ 180: <span class="ruby-keyword kw">end</span></pre>
20
+ </body>
21
+ </html>
@@ -0,0 +1,24 @@
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>html (Markaby::Builder)</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/builder.rb, line 185</span>
14
+ 185: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">html</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">args</span>, <span class="ruby-operator">&amp;</span><span class="ruby-identifier">block</span>)
15
+ 186: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">args</span>.<span class="ruby-identifier">empty?</span>
16
+ 187: <span class="ruby-identifier">args</span> = [<span class="ruby-value str">&quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot;</span>, <span class="ruby-value str">&quot;DTD/xhtml1-transitional.dtd&quot;</span>]
17
+ 188: <span class="ruby-keyword kw">end</span>
18
+ 189: <span class="ruby-ivar">@builder</span>.<span class="ruby-identifier">instruct!</span>
19
+ 190: <span class="ruby-ivar">@builder</span>.<span class="ruby-identifier">declare!</span>(<span class="ruby-identifier">:DOCTYPE</span>, <span class="ruby-identifier">:html</span>, <span class="ruby-identifier">:PUBLIC</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">args</span>)
20
+ 191: <span class="ruby-identifier">tag!</span>(<span class="ruby-identifier">:html</span>, <span class="ruby-identifier">:xmlns</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">&quot;http://www.w3.org/1999/xhtml&quot;</span>,
21
+ 192: <span class="ruby-value str">&quot;xml:lang&quot;</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">&quot;en&quot;</span>, <span class="ruby-identifier">:lang</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">&quot;en&quot;</span>, <span class="ruby-operator">&amp;</span><span class="ruby-identifier">block</span>)
22
+ 193: <span class="ruby-keyword kw">end</span></pre>
23
+ </body>
24
+ </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>xhtml_strict (Markaby::Builder)</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/builder.rb, line 197</span>
14
+ 197: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">xhtml_strict</span>(<span class="ruby-operator">&amp;</span><span class="ruby-identifier">block</span>)
15
+ 198: <span class="ruby-identifier">html</span>(<span class="ruby-value str">&quot;-//W3C//DTD XHTML 1.0 Strict//EN&quot;</span>, <span class="ruby-value str">&quot;DTD/xhtml1-strict.dtd&quot;</span>, <span class="ruby-operator">&amp;</span><span class="ruby-identifier">block</span>)
16
+ 199: <span class="ruby-keyword kw">end</span></pre>
17
+ </body>
18
+ </html>
@@ -0,0 +1,177 @@
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::CssProxy</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::CssProxy</td>
54
+ </tr>
55
+ <tr class="top-aligned-row">
56
+ <td><strong>In:</strong></td>
57
+ <td>
58
+ <a href="../../files/lib/markaby/cssproxy_rb.html">
59
+ lib/markaby/cssproxy.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
+ <div id="description">
84
+ <p>
85
+ Class used by <a href="Builder.html">Markaby::Builder</a> to store element
86
+ options. Methods called against the <a href="CssProxy.html">CssProxy</a>
87
+ object are added as element classes or IDs.
88
+ </p>
89
+ <p>
90
+ See the README for examples.
91
+ </p>
92
+
93
+ </div>
94
+
95
+
96
+ </div>
97
+
98
+ <div id="method-list">
99
+ <h3 class="section-bar">Methods</h3>
100
+
101
+ <div class="name-list">
102
+ <a href="#M000007">method_missing</a>&nbsp;&nbsp;
103
+ <a href="#M000006">new</a>&nbsp;&nbsp;
104
+ </div>
105
+ </div>
106
+
107
+ </div>
108
+
109
+
110
+ <!-- if includes -->
111
+
112
+ <div id="section">
113
+
114
+
115
+
116
+
117
+
118
+
119
+
120
+
121
+ <!-- if method_list -->
122
+ <div id="methods">
123
+ <h3 class="section-bar">Public Class methods</h3>
124
+
125
+ <div id="method-M000006" class="method-detail">
126
+ <a name="M000006"></a>
127
+
128
+ <div class="method-heading">
129
+ <a href="CssProxy.src/M000006.html" target="Code" class="method-signature"
130
+ onclick="popupCode('CssProxy.src/M000006.html');return false;">
131
+ <span class="method-name">new</span><span class="method-args">(opts = {}, &amp;blk)</span>
132
+ </a>
133
+ </div>
134
+
135
+ <div class="method-description">
136
+ <p>
137
+ Creates a <a href="CssProxy.html">CssProxy</a> object. The <tt>opts</tt>
138
+ and <tt>block</tt> passed in are stored until the element is created by
139
+ Builder.tag!
140
+ </p>
141
+ </div>
142
+ </div>
143
+
144
+ <h3 class="section-bar">Public Instance methods</h3>
145
+
146
+ <div id="method-M000007" class="method-detail">
147
+ <a name="M000007"></a>
148
+
149
+ <div class="method-heading">
150
+ <a href="CssProxy.src/M000007.html" target="Code" class="method-signature"
151
+ onclick="popupCode('CssProxy.src/M000007.html');return false;">
152
+ <span class="method-name">method_missing</span><span class="method-args">(id_or_class, *args, &amp;blk)</span>
153
+ </a>
154
+ </div>
155
+
156
+ <div class="method-description">
157
+ <p>
158
+ Adds attributes to an element. Bang methods set the :id attribute. Other
159
+ methods add to the :class attribute. If a block is supplied, it is executed
160
+ with a merged hash (@opts + args).
161
+ </p>
162
+ </div>
163
+ </div>
164
+
165
+
166
+ </div>
167
+
168
+
169
+ </div>
170
+
171
+
172
+ <div id="validator-badges">
173
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
174
+ </div>
175
+
176
+ </body>
177
+ </html>