kwartz 3.0.0 → 3.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (179) hide show
  1. data/ChangeLog +36 -1
  2. data/LGPL +504 -0
  3. data/README.txt +16 -2
  4. data/bin/kwartz +1 -1
  5. data/doc-api/classes/Kwartz.html +47 -1
  6. data/doc-api/classes/Kwartz/Assertion.html +6 -6
  7. data/doc-api/classes/Kwartz/AssertionError.html +6 -6
  8. data/doc-api/classes/Kwartz/AttrInfo.html +42 -42
  9. data/doc-api/classes/Kwartz/BaseError.html +12 -12
  10. data/doc-api/classes/Kwartz/BaseTranslator.html +210 -43
  11. data/doc-api/classes/Kwartz/CharacterType.html +24 -24
  12. data/doc-api/classes/Kwartz/CommandOptionError.html +7 -7
  13. data/doc-api/classes/Kwartz/CommandOptions.html +49 -49
  14. data/doc-api/classes/Kwartz/Config.html +6 -1
  15. data/doc-api/classes/Kwartz/ConvertError.html +14 -14
  16. data/doc-api/classes/Kwartz/Converter.html +31 -30
  17. data/doc-api/classes/Kwartz/CssStyleParser.html +79 -57
  18. data/doc-api/classes/Kwartz/Defun.html +313 -0
  19. data/doc-api/classes/Kwartz/DocumentRuleset.html +58 -58
  20. data/doc-api/classes/Kwartz/ElementExpander.html +32 -32
  21. data/doc-api/classes/Kwartz/ElementInfo.html +29 -29
  22. data/doc-api/classes/Kwartz/ElementRuleset.html +126 -96
  23. data/doc-api/classes/Kwartz/EperlHandler.html +108 -84
  24. data/doc-api/classes/Kwartz/EperlTranslator.html +7 -7
  25. data/doc-api/classes/Kwartz/ErubisHandler.html +2 -2
  26. data/doc-api/classes/Kwartz/ErubisTranslator.html +8 -8
  27. data/doc-api/classes/Kwartz/ErubyHandler.html +2 -220
  28. data/doc-api/classes/Kwartz/ErubyTranslator.html +7 -7
  29. data/doc-api/classes/Kwartz/ExpandStatement.html +20 -20
  30. data/doc-api/classes/Kwartz/Handler.html +122 -117
  31. data/doc-api/classes/Kwartz/HandlerArgument.html +215 -0
  32. data/doc-api/classes/Kwartz/Helper.html +112 -0
  33. data/doc-api/classes/Kwartz/Helper/ActionViewHelper.html +221 -0
  34. data/doc-api/classes/Kwartz/Helper/RailsTemplate.html +630 -0
  35. data/doc-api/classes/Kwartz/JstlHandler.html +208 -193
  36. data/doc-api/classes/Kwartz/JstlTranslator.html +15 -15
  37. data/doc-api/classes/Kwartz/KwartzError.html +6 -6
  38. data/doc-api/classes/Kwartz/Main.html +39 -23
  39. data/doc-api/classes/Kwartz/NativeExpression.html +18 -18
  40. data/doc-api/classes/Kwartz/NativeStatement.html +25 -25
  41. data/doc-api/classes/Kwartz/Node.html +6 -6
  42. data/doc-api/classes/Kwartz/PIErubisHandler.html +113 -0
  43. data/doc-api/classes/Kwartz/PIErubisTranslator.html +200 -0
  44. data/doc-api/classes/Kwartz/ParseError.html +6 -6
  45. data/doc-api/classes/Kwartz/PhpHandler.html +102 -83
  46. data/doc-api/classes/Kwartz/PhpTranslator.html +14 -14
  47. data/doc-api/classes/Kwartz/PresentationLogicParser.html +136 -128
  48. data/doc-api/classes/Kwartz/PrintStatement.html +19 -19
  49. data/doc-api/classes/Kwartz/RailsHandler.html +121 -118
  50. data/doc-api/classes/Kwartz/RailsTranslator.html +7 -7
  51. data/doc-api/classes/Kwartz/RubyHandler.html +349 -0
  52. data/doc-api/classes/Kwartz/RubyStyleParser.html +85 -85
  53. data/doc-api/classes/Kwartz/RubyTranslator.html +218 -0
  54. data/doc-api/classes/Kwartz/StatementHelper.html +479 -0
  55. data/doc-api/classes/Kwartz/StrutsTranslator.html +12 -12
  56. data/doc-api/classes/Kwartz/TagInfo.html +28 -28
  57. data/doc-api/classes/Kwartz/TextConverter.html +28 -28
  58. data/doc-api/classes/Kwartz/Translator.html +42 -42
  59. data/doc-api/classes/Kwartz/Util.html +284 -0
  60. data/doc-api/created.rid +1 -1
  61. data/doc-api/files/__/README_txt.html +30 -3
  62. data/doc-api/files/kwartz/assert_rb.html +1 -1
  63. data/doc-api/files/kwartz/binding/eperl_rb.html +2 -2
  64. data/doc-api/files/kwartz/binding/erubis_rb.html +3 -3
  65. data/doc-api/files/kwartz/binding/eruby_rb.html +3 -2
  66. data/doc-api/files/kwartz/binding/jstl_rb.html +2 -2
  67. data/doc-api/files/kwartz/binding/php_rb.html +2 -2
  68. data/doc-api/files/kwartz/binding/pierubis_rb.html +116 -0
  69. data/doc-api/files/kwartz/binding/rails_rb.html +2 -2
  70. data/doc-api/files/kwartz/binding/ruby_rb.html +115 -0
  71. data/doc-api/files/kwartz/binding/struts_rb.html +1 -1
  72. data/doc-api/files/kwartz/config_rb.html +2 -2
  73. data/doc-api/files/kwartz/converter_rb.html +3 -2
  74. data/doc-api/files/kwartz/defun_rb.html +116 -0
  75. data/doc-api/files/kwartz/error_rb.html +1 -1
  76. data/doc-api/files/kwartz/helper/rails_rb.html +123 -0
  77. data/doc-api/files/kwartz/main_rb.html +5 -2
  78. data/doc-api/files/kwartz/node_rb.html +2 -2
  79. data/doc-api/files/kwartz/parser_rb.html +2 -2
  80. data/doc-api/files/kwartz/translator_rb.html +2 -2
  81. data/doc-api/files/kwartz/util/assert-text-equal_rb.html +1 -1
  82. data/doc-api/files/kwartz/util/testcase-helper_rb.html +2 -2
  83. data/doc-api/files/kwartz/util_rb.html +107 -0
  84. data/doc-api/files/kwartz_rb.html +3 -2
  85. data/doc-api/fr_class_index.html +11 -0
  86. data/doc-api/fr_file_index.html +5 -0
  87. data/doc-api/fr_method_index.html +242 -190
  88. data/doc/p-pattern.html +94 -94
  89. data/doc/reference.html +847 -612
  90. data/doc/users-guide.html +744 -241
  91. data/examples/rails1/README +2 -2
  92. data/examples/rails1/application_helper.rb +2 -27
  93. data/examples/rails1/link_to.plogic +5 -5
  94. data/examples/rails1/list.plogic +2 -2
  95. data/examples/rails2/app/controllers/application.rb +14 -0
  96. data/examples/rails2/app/controllers/groups_controller.rb +47 -0
  97. data/examples/rails2/app/controllers/members_controller.rb +56 -0
  98. data/examples/rails2/app/helpers/application_helper.rb +6 -0
  99. data/examples/rails2/app/helpers/groups_helper.rb +2 -0
  100. data/examples/rails2/app/helpers/members_helper.rb +2 -0
  101. data/examples/rails2/app/models/group.rb +2 -0
  102. data/examples/rails2/app/models/member.rb +3 -0
  103. data/examples/rails2/app/views/groups/_form.html +30 -0
  104. data/examples/rails2/app/views/groups/_form.plogic +11 -0
  105. data/examples/rails2/app/views/groups/_link.plogic +19 -0
  106. data/examples/rails2/app/views/groups/_read.plogic +7 -0
  107. data/examples/rails2/app/views/groups/edit.cfg.yaml +2 -0
  108. data/examples/rails2/app/views/groups/edit.html +26 -0
  109. data/examples/rails2/app/views/groups/edit.plogic +9 -0
  110. data/examples/rails2/app/views/groups/list.html +48 -0
  111. data/examples/rails2/app/views/groups/list.plogic +32 -0
  112. data/examples/rails2/app/views/groups/new.cfg.yaml +2 -0
  113. data/examples/rails2/app/views/groups/new.html +27 -0
  114. data/examples/rails2/app/views/groups/new.plogic +9 -0
  115. data/examples/rails2/app/views/groups/show.html +27 -0
  116. data/examples/rails2/app/views/groups/show.plogic +2 -0
  117. data/examples/rails2/app/views/layouts/groups.html +23 -0
  118. data/examples/rails2/app/views/layouts/groups.plogic +11 -0
  119. data/examples/rails2/app/views/layouts/members.html +23 -0
  120. data/examples/rails2/app/views/layouts/members.plogic +11 -0
  121. data/examples/rails2/app/views/layouts/members2.html +24 -0
  122. data/examples/rails2/app/views/layouts/members2.plogic +11 -0
  123. data/examples/rails2/app/views/members/_form.plogic +27 -0
  124. data/examples/rails2/app/views/members/_link.plogic +19 -0
  125. data/examples/rails2/app/views/members/_read.plogic +29 -0
  126. data/examples/rails2/app/views/members/edit.cfg.yaml +6 -0
  127. data/examples/rails2/app/views/members/edit.html +27 -0
  128. data/examples/rails2/app/views/members/edit.plogic +10 -0
  129. data/examples/rails2/app/views/members/list.html +53 -0
  130. data/examples/rails2/app/views/members/list.plogic +32 -0
  131. data/examples/rails2/app/views/members/new.html +61 -0
  132. data/examples/rails2/app/views/members/new.plogic +17 -0
  133. data/examples/rails2/app/views/members/show.html +41 -0
  134. data/examples/rails2/app/views/members/show.plogic +3 -0
  135. data/examples/rails2/db/create-tables.mysql.sql +27 -0
  136. data/examples/rails2/db/create-tables.pgsql.sql +27 -0
  137. data/examples/rails2/db/insert-data.sql +21 -0
  138. data/examples/rails2/db/tabledef.yaml +51 -0
  139. data/kwartz.gemspec +4 -4
  140. data/lib/kwartz.rb +10 -2
  141. data/lib/kwartz/assert.rb +1 -1
  142. data/lib/kwartz/binding/eperl.rb +85 -61
  143. data/lib/kwartz/binding/erubis.rb +6 -8
  144. data/lib/kwartz/binding/eruby.rb +5 -120
  145. data/lib/kwartz/binding/jstl.rb +116 -101
  146. data/lib/kwartz/binding/php.rb +79 -60
  147. data/lib/kwartz/binding/pierubis.rb +58 -0
  148. data/lib/kwartz/binding/rails.rb +45 -42
  149. data/lib/kwartz/binding/ruby.rb +193 -0
  150. data/lib/kwartz/binding/struts.rb +1 -1
  151. data/lib/kwartz/config.rb +4 -3
  152. data/lib/kwartz/converter.rb +231 -68
  153. data/lib/kwartz/defun.rb +126 -0
  154. data/lib/kwartz/error.rb +1 -1
  155. data/lib/kwartz/helper/rails.rb +437 -0
  156. data/lib/kwartz/main.rb +30 -38
  157. data/lib/kwartz/node.rb +46 -31
  158. data/lib/kwartz/parser.rb +43 -15
  159. data/lib/kwartz/translator.rb +104 -6
  160. data/lib/kwartz/util.rb +113 -0
  161. data/lib/kwartz/util/assert-text-equal.rb +1 -1
  162. data/lib/kwartz/util/testcase-helper.rb +26 -8
  163. data/test/test-compile.rb +3 -3
  164. data/test/test-compile.yaml +135 -5
  165. data/test/test-converter.rb +16 -8
  166. data/test/test-converter.yaml +307 -76
  167. data/test/test-directives.rb +1 -1
  168. data/test/test-directives.yaml +964 -979
  169. data/test/test-main.rb +61 -146
  170. data/test/test-main.yaml +235 -0
  171. data/test/test-parser.rb +10 -12
  172. data/test/test-parser.yaml +484 -326
  173. data/test/test-rails.rb +1 -1
  174. data/test/test-rails.yaml +37 -37
  175. data/test/test-ruleset.rb +1 -1
  176. data/test/test-ruleset.yaml +34 -40
  177. data/test/test.rb +1 -1
  178. metadata +82 -3
  179. data/COPYING +0 -340
@@ -0,0 +1,218 @@
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: Kwartz::RubyTranslator</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">Kwartz::RubyTranslator</td>
54
+ </tr>
55
+ <tr class="top-aligned-row">
56
+ <td><strong>In:</strong></td>
57
+ <td>
58
+ <a href="../../files/kwartz/binding/ruby_rb.html">
59
+ kwartz/binding/ruby.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="BaseTranslator.html">
69
+ BaseTranslator
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
+ translator for eRuby
86
+ </p>
87
+
88
+ </div>
89
+
90
+
91
+ </div>
92
+
93
+ <div id="method-list">
94
+ <h3 class="section-bar">Methods</h3>
95
+
96
+ <div class="name-list">
97
+ <a href="#M000210">new</a>&nbsp;&nbsp;
98
+ <a href="#M000212">translate</a>&nbsp;&nbsp;
99
+ <a href="#M000211">translate_string</a>&nbsp;&nbsp;
100
+ </div>
101
+ </div>
102
+
103
+ </div>
104
+
105
+
106
+ <!-- if includes -->
107
+
108
+ <div id="section">
109
+
110
+
111
+
112
+
113
+
114
+
115
+
116
+
117
+ <!-- if method_list -->
118
+ <div id="methods">
119
+ <h3 class="section-bar">Public Class methods</h3>
120
+
121
+ <div id="method-M000210" class="method-detail">
122
+ <a name="M000210"></a>
123
+
124
+ <div class="method-heading">
125
+ <a href="#M000210" class="method-signature">
126
+ <span class="method-name">new</span><span class="method-args">(properties={})</span>
127
+ </a>
128
+ </div>
129
+
130
+ <div class="method-description">
131
+ <p><a class="source-toggle" href="#"
132
+ onclick="toggleCode('M000210-source');return false;">[Source]</a></p>
133
+ <div class="method-source-code" id="M000210-source">
134
+ <pre>
135
+ <span class="ruby-comment cmt"># File kwartz/binding/ruby.rb, line 159</span>
136
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">properties</span>={})
137
+ <span class="ruby-identifier">escapefunc</span> = <span class="ruby-identifier">properties</span>[<span class="ruby-identifier">:escapefunc</span>] <span class="ruby-operator">||</span> <span class="ruby-value str">'ERB::Util.h'</span>
138
+ <span class="ruby-identifier">marks</span> = [<span class="ruby-value str">''</span>, <span class="ruby-value str">''</span>, <span class="ruby-value str">'_buf &lt;&lt; ('</span>, <span class="ruby-value str">').to_s; '</span>, <span class="ruby-node">&quot;_buf &lt;&lt; #{escapefunc}(&quot;</span>, <span class="ruby-value str">'); '</span>]
139
+ <span class="ruby-keyword kw">super</span>(<span class="ruby-identifier">marks</span>, <span class="ruby-identifier">properties</span>)
140
+ <span class="ruby-ivar">@header</span> = <span class="ruby-value str">'_buf = &quot;&quot;; '</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-ivar">@header</span> <span class="ruby-operator">==</span> <span class="ruby-keyword kw">false</span>
141
+ <span class="ruby-ivar">@footer</span> = <span class="ruby-value str">'; _buf'</span> <span class="ruby-operator">+</span> <span class="ruby-ivar">@nl</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-ivar">@footer</span> <span class="ruby-operator">==</span> <span class="ruby-keyword kw">false</span>
142
+ <span class="ruby-keyword kw">end</span>
143
+ </pre>
144
+ </div>
145
+ </div>
146
+ </div>
147
+
148
+ <h3 class="section-bar">Public Instance methods</h3>
149
+
150
+ <div id="method-M000212" class="method-detail">
151
+ <a name="M000212"></a>
152
+
153
+ <div class="method-heading">
154
+ <a href="#M000212" class="method-signature">
155
+ <span class="method-name">translate</span><span class="method-args">(stmt_list)</span>
156
+ </a>
157
+ </div>
158
+
159
+ <div class="method-description">
160
+ <p><a class="source-toggle" href="#"
161
+ onclick="toggleCode('M000212-source');return false;">[Source]</a></p>
162
+ <div class="method-source-code" id="M000212-source">
163
+ <pre>
164
+ <span class="ruby-comment cmt"># File kwartz/binding/ruby.rb, line 182</span>
165
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">translate</span>(<span class="ruby-identifier">stmt_list</span>)
166
+ <span class="ruby-identifier">stmt_list2</span> = <span class="ruby-identifier">optimize_print_stmts</span>(<span class="ruby-identifier">stmt_list</span>)
167
+ <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">super</span>(<span class="ruby-identifier">stmt_list2</span>)
168
+ <span class="ruby-keyword kw">end</span>
169
+ </pre>
170
+ </div>
171
+ </div>
172
+ </div>
173
+
174
+ <div id="method-M000211" class="method-detail">
175
+ <a name="M000211"></a>
176
+
177
+ <div class="method-heading">
178
+ <a href="#M000211" class="method-signature">
179
+ <span class="method-name">translate_string</span><span class="method-args">(str)</span>
180
+ </a>
181
+ </div>
182
+
183
+ <div class="method-description">
184
+ <p><a class="source-toggle" href="#"
185
+ onclick="toggleCode('M000211-source');return false;">[Source]</a></p>
186
+ <div class="method-source-code" id="M000211-source">
187
+ <pre>
188
+ <span class="ruby-comment cmt"># File kwartz/binding/ruby.rb, line 168</span>
189
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">translate_string</span>(<span class="ruby-identifier">str</span>)
190
+ <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">str</span>.<span class="ruby-identifier">nil?</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">str</span>.<span class="ruby-identifier">empty?</span>
191
+ <span class="ruby-comment cmt">#str.gsub!(/['\\]/, '\\\\\&amp;')</span>
192
+ <span class="ruby-comment cmt">#@sb &lt;&lt; &quot;_buf &lt;&lt; '#{str}'; &quot;</span>
193
+ <span class="ruby-identifier">str</span>.<span class="ruby-identifier">gsub!</span>(<span class="ruby-regexp re">/[&quot;\\]/</span>, <span class="ruby-value str">'\\\\\&amp;'</span>)
194
+ <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">str</span>[<span class="ruby-value">-1</span>] <span class="ruby-operator">==</span> <span class="ruby-value">?\n</span>
195
+ <span class="ruby-identifier">str</span>.<span class="ruby-identifier">chop!</span>
196
+ <span class="ruby-ivar">@sb</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-node">&quot;_buf &lt;&lt; \&quot;#{str}\\n\&quot;;&quot;</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-ivar">@nl</span>
197
+ <span class="ruby-keyword kw">else</span>
198
+ <span class="ruby-ivar">@sb</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-node">&quot;_buf &lt;&lt; \&quot;#{str}\&quot;; &quot;</span>
199
+ <span class="ruby-keyword kw">end</span>
200
+ <span class="ruby-keyword kw">end</span>
201
+ </pre>
202
+ </div>
203
+ </div>
204
+ </div>
205
+
206
+
207
+ </div>
208
+
209
+
210
+ </div>
211
+
212
+
213
+ <div id="validator-badges">
214
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
215
+ </div>
216
+
217
+ </body>
218
+ </html>
@@ -0,0 +1,479 @@
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>Module: Kwartz::StatementHelper</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>Module</strong></td>
53
+ <td class="class-name-in-header">Kwartz::StatementHelper</td>
54
+ </tr>
55
+ <tr class="top-aligned-row">
56
+ <td><strong>In:</strong></td>
57
+ <td>
58
+ <a href="../../files/kwartz/converter_rb.html">
59
+ kwartz/converter.rb
60
+ </a>
61
+ <br />
62
+ </td>
63
+ </tr>
64
+
65
+ </table>
66
+ </div>
67
+ <!-- banner header -->
68
+
69
+ <div id="bodyContent">
70
+
71
+
72
+
73
+ <div id="contextContent">
74
+
75
+
76
+
77
+ </div>
78
+
79
+ <div id="method-list">
80
+ <h3 class="section-bar">Methods</h3>
81
+
82
+ <div class="name-list">
83
+ <a href="#M000010">add_foreach_stmts</a>&nbsp;&nbsp;
84
+ <a href="#M000007">add_native_code</a>&nbsp;&nbsp;
85
+ <a href="#M000011">add_native_expr_with_default</a>&nbsp;&nbsp;
86
+ <a href="#M000002">build_print_args</a>&nbsp;&nbsp;
87
+ <a href="#M000004">build_print_expr_stmt</a>&nbsp;&nbsp;
88
+ <a href="#M000003">build_print_stmt</a>&nbsp;&nbsp;
89
+ <a href="#M000001">create_text_print_stmt</a>&nbsp;&nbsp;
90
+ <a href="#M000006">etag_stmt</a>&nbsp;&nbsp;
91
+ <a href="#M000005">stag_stmt</a>&nbsp;&nbsp;
92
+ <a href="#M000009">wrap_content_with_native_stmt</a>&nbsp;&nbsp;
93
+ <a href="#M000008">wrap_element_with_native_stmt</a>&nbsp;&nbsp;
94
+ </div>
95
+ </div>
96
+
97
+ </div>
98
+
99
+
100
+ <!-- if includes -->
101
+
102
+ <div id="section">
103
+
104
+
105
+
106
+
107
+
108
+
109
+
110
+
111
+ <!-- if method_list -->
112
+ <div id="methods">
113
+ <h3 class="section-bar">Public Instance methods</h3>
114
+
115
+ <div id="method-M000010" class="method-detail">
116
+ <a name="M000010"></a>
117
+
118
+ <div class="method-heading">
119
+ <a href="#M000010" class="method-signature">
120
+ <span class="method-name">add_foreach_stmts</span><span class="method-args">(stmt_list, handler_arg, foreach_code, endforeach_code, content_only, counter, toggle, init_code, incr_code, toggle_code)</span>
121
+ </a>
122
+ </div>
123
+
124
+ <div class="method-description">
125
+ <p><a class="source-toggle" href="#"
126
+ onclick="toggleCode('M000010-source');return false;">[Source]</a></p>
127
+ <div class="method-source-code" id="M000010-source">
128
+ <pre>
129
+ <span class="ruby-comment cmt"># File kwartz/converter.rb, line 389</span>
130
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">add_foreach_stmts</span>(<span class="ruby-identifier">stmt_list</span>, <span class="ruby-identifier">handler_arg</span>, <span class="ruby-identifier">foreach_code</span>, <span class="ruby-identifier">endforeach_code</span>,
131
+ <span class="ruby-identifier">content_only</span>, <span class="ruby-identifier">counter</span>, <span class="ruby-identifier">toggle</span>, <span class="ruby-identifier">init_code</span>, <span class="ruby-identifier">incr_code</span>, <span class="ruby-identifier">toggle_code</span>)
132
+ <span class="ruby-identifier">arg</span> = <span class="ruby-identifier">handler_arg</span>
133
+ <span class="ruby-identifier">stmt_list</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">stag_stmt</span>(<span class="ruby-identifier">arg</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">content_only</span>
134
+ <span class="ruby-identifier">start_code</span>.<span class="ruby-identifier">split</span>(<span class="ruby-regexp re">/\n/</span>).<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">code</span><span class="ruby-operator">|</span>
135
+ <span class="ruby-identifier">stmt_list</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-constant">NativeStatement</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">code</span>, <span class="ruby-identifier">kind</span>)
136
+ <span class="ruby-keyword kw">end</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">start_code</span>
137
+ <span class="ruby-identifier">stmt_list</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">stag_stmt</span>(<span class="ruby-identifier">arg</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-operator">!</span><span class="ruby-identifier">content_only</span>
138
+ <span class="ruby-identifier">stmt_list</span>.<span class="ruby-identifier">concat</span>(<span class="ruby-identifier">arg</span>.<span class="ruby-identifier">cont_stmts</span>)
139
+ <span class="ruby-identifier">stmt_list</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">etag_stmt</span>(<span class="ruby-identifier">arg</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-operator">!</span><span class="ruby-identifier">content_only</span>
140
+ <span class="ruby-identifier">end_code</span>.<span class="ruby-identifier">split</span>(<span class="ruby-regexp re">/\n/</span>).<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">code</span><span class="ruby-operator">|</span>
141
+ <span class="ruby-identifier">stmt_list</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-constant">NativeStatement</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">code</span>, <span class="ruby-identifier">kind</span>)
142
+ <span class="ruby-keyword kw">end</span>
143
+ <span class="ruby-identifier">stmt_list</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">etag_stmt</span>(<span class="ruby-identifier">arg</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">content_only</span>
144
+ <span class="ruby-keyword kw">end</span>
145
+ </pre>
146
+ </div>
147
+ </div>
148
+ </div>
149
+
150
+ <div id="method-M000007" class="method-detail">
151
+ <a name="M000007"></a>
152
+
153
+ <div class="method-heading">
154
+ <a href="#M000007" class="method-signature">
155
+ <span class="method-name">add_native_code</span><span class="method-args">(stmt_list, code, kind)</span>
156
+ </a>
157
+ </div>
158
+
159
+ <div class="method-description">
160
+ <p><a class="source-toggle" href="#"
161
+ onclick="toggleCode('M000007-source');return false;">[Source]</a></p>
162
+ <div class="method-source-code" id="M000007-source">
163
+ <pre>
164
+ <span class="ruby-comment cmt"># File kwartz/converter.rb, line 362</span>
165
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">add_native_code</span>(<span class="ruby-identifier">stmt_list</span>, <span class="ruby-identifier">code</span>, <span class="ruby-identifier">kind</span>)
166
+ <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">code</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">String</span>)
167
+ <span class="ruby-identifier">stmt_list</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-constant">NativeStatement</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">code</span>, <span class="ruby-identifier">kind</span>)
168
+ <span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">code</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Array</span>)
169
+ <span class="ruby-identifier">stmt_list</span>.<span class="ruby-identifier">concat</span>(<span class="ruby-identifier">code</span>.<span class="ruby-identifier">collect</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">line</span><span class="ruby-operator">|</span> <span class="ruby-constant">NativeStatement</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">line</span>, <span class="ruby-identifier">kind</span>)})
170
+ <span class="ruby-keyword kw">end</span>
171
+ <span class="ruby-keyword kw">end</span>
172
+ </pre>
173
+ </div>
174
+ </div>
175
+ </div>
176
+
177
+ <div id="method-M000011" class="method-detail">
178
+ <a name="M000011"></a>
179
+
180
+ <div class="method-heading">
181
+ <a href="#M000011" class="method-signature">
182
+ <span class="method-name">add_native_expr_with_default</span><span class="method-args">(stmt_list, handler_arg, expr_code, flag_escape, if_code, else_code, endif_code)</span>
183
+ </a>
184
+ </div>
185
+
186
+ <div class="method-description">
187
+ <p><a class="source-toggle" href="#"
188
+ onclick="toggleCode('M000011-source');return false;">[Source]</a></p>
189
+ <div class="method-source-code" id="M000011-source">
190
+ <pre>
191
+ <span class="ruby-comment cmt"># File kwartz/converter.rb, line 406</span>
192
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">add_native_expr_with_default</span>(<span class="ruby-identifier">stmt_list</span>, <span class="ruby-identifier">handler_arg</span>,
193
+ <span class="ruby-identifier">expr_code</span>, <span class="ruby-identifier">flag_escape</span>,
194
+ <span class="ruby-identifier">if_code</span>, <span class="ruby-identifier">else_code</span>, <span class="ruby-identifier">endif_code</span>)
195
+ <span class="ruby-identifier">arg</span> = <span class="ruby-identifier">handler_arg</span>
196
+ <span class="ruby-identifier">stmt_list</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">stag_stmt</span>(<span class="ruby-identifier">arg</span>)
197
+ <span class="ruby-identifier">stmt_list</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-constant">NativeStatement</span>.<span class="ruby-identifier">new_without_newline</span>(<span class="ruby-identifier">if_code</span>, <span class="ruby-identifier">:if</span>)
198
+ <span class="ruby-identifier">stmt_list</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-constant">PrintStatement</span>.<span class="ruby-identifier">new</span>([ <span class="ruby-constant">NativeExpression</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">expr_code</span>, <span class="ruby-identifier">flag_escape</span>) ])
199
+ <span class="ruby-identifier">stmt_list</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-constant">NativeStatement</span>.<span class="ruby-identifier">new_without_newline</span>(<span class="ruby-identifier">else_code</span>, <span class="ruby-identifier">:else</span>)
200
+ <span class="ruby-identifier">stmt_list</span>.<span class="ruby-identifier">concat</span>(<span class="ruby-identifier">arg</span>.<span class="ruby-identifier">cont_stmts</span>)
201
+ <span class="ruby-identifier">stmt_list</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-constant">NativeStatement</span>.<span class="ruby-identifier">new_without_newline</span>(<span class="ruby-identifier">endif_code</span>, <span class="ruby-identifier">:else</span>)
202
+ <span class="ruby-identifier">stmt_list</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">etag_stmt</span>(<span class="ruby-identifier">arg</span>)
203
+ <span class="ruby-keyword kw">end</span>
204
+ </pre>
205
+ </div>
206
+ </div>
207
+ </div>
208
+
209
+ <div id="method-M000002" class="method-detail">
210
+ <a name="M000002"></a>
211
+
212
+ <div class="method-heading">
213
+ <a href="#M000002" class="method-signature">
214
+ <span class="method-name">build_print_args</span><span class="method-args">(taginfo, attr_info, append_exprs)</span>
215
+ </a>
216
+ </div>
217
+
218
+ <div class="method-description">
219
+ <p>
220
+ create array of String and <a
221
+ href="NativeExpression.html">NativeExpression</a> for <a
222
+ href="PrintStatement.html">PrintStatement</a>
223
+ </p>
224
+ <p><a class="source-toggle" href="#"
225
+ onclick="toggleCode('M000002-source');return false;">[Source]</a></p>
226
+ <div class="method-source-code" id="M000002-source">
227
+ <pre>
228
+ <span class="ruby-comment cmt"># File kwartz/converter.rb, line 290</span>
229
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">build_print_args</span>(<span class="ruby-identifier">taginfo</span>, <span class="ruby-identifier">attr_info</span>, <span class="ruby-identifier">append_exprs</span>)
230
+ <span class="ruby-keyword kw">return</span> [] <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">taginfo</span>.<span class="ruby-identifier">tagname</span>.<span class="ruby-identifier">nil?</span>
231
+ <span class="ruby-comment cmt">#if taginfo.tagname.nil?</span>
232
+ <span class="ruby-comment cmt"># if (!attr_info || attr_info.empty?) &amp;&amp; (!append_exprs || append_exprs.empty?)</span>
233
+ <span class="ruby-comment cmt"># return []</span>
234
+ <span class="ruby-comment cmt"># else</span>
235
+ <span class="ruby-comment cmt"># taginfo.tagname = 'span'</span>
236
+ <span class="ruby-comment cmt"># end</span>
237
+ <span class="ruby-comment cmt">#end</span>
238
+ <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">attr_info</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">append_exprs</span>
239
+ <span class="ruby-keyword kw">return</span> [<span class="ruby-identifier">taginfo</span>.<span class="ruby-identifier">tag_text</span>]
240
+ <span class="ruby-keyword kw">end</span>
241
+ <span class="ruby-identifier">args</span> = []
242
+ <span class="ruby-identifier">t</span> = <span class="ruby-identifier">taginfo</span>
243
+ <span class="ruby-identifier">sb</span> = <span class="ruby-node">&quot;#{t.head_space}&lt;#{t.is_etag ? '/' : ''}#{t.tagname}&quot;</span>
244
+ <span class="ruby-identifier">attr_info</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">space</span>, <span class="ruby-identifier">aname</span>, <span class="ruby-identifier">avalue</span><span class="ruby-operator">|</span>
245
+ <span class="ruby-identifier">sb</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-node">&quot;#{space}#{aname}=\&quot;&quot;</span>
246
+ <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">avalue</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">NativeExpression</span>)
247
+ <span class="ruby-identifier">args</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">sb</span> <span class="ruby-comment cmt"># TextExpression.new(sb)</span>
248
+ <span class="ruby-identifier">args</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">avalue</span>
249
+ <span class="ruby-identifier">sb</span> = <span class="ruby-value str">''</span>
250
+ <span class="ruby-keyword kw">else</span>
251
+ <span class="ruby-identifier">sb</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">avalue</span>
252
+ <span class="ruby-keyword kw">end</span>
253
+ <span class="ruby-identifier">sb</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-value str">'&quot;'</span>
254
+ <span class="ruby-keyword kw">end</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">attr_info</span>
255
+ <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">append_exprs</span> <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-operator">!</span><span class="ruby-identifier">append_exprs</span>.<span class="ruby-identifier">empty?</span>
256
+ <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">sb</span>.<span class="ruby-identifier">empty?</span>
257
+ <span class="ruby-identifier">args</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">sb</span> <span class="ruby-comment cmt"># TextExpression.new(sb)</span>
258
+ <span class="ruby-identifier">sb</span> = <span class="ruby-value str">''</span>
259
+ <span class="ruby-keyword kw">end</span>
260
+ <span class="ruby-identifier">args</span>.<span class="ruby-identifier">concat</span>(<span class="ruby-identifier">append_exprs</span>)
261
+ <span class="ruby-keyword kw">end</span>
262
+ <span class="ruby-identifier">sb</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-node">&quot;#{t.extra_space}#{t.is_empty ? '/' : ''}&gt;#{t.tail_space}&quot;</span>
263
+ <span class="ruby-identifier">args</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">sb</span> <span class="ruby-comment cmt"># TextExpression.new(sb)</span>
264
+ <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">args</span>
265
+ <span class="ruby-keyword kw">end</span>
266
+ </pre>
267
+ </div>
268
+ </div>
269
+ </div>
270
+
271
+ <div id="method-M000004" class="method-detail">
272
+ <a name="M000004"></a>
273
+
274
+ <div class="method-heading">
275
+ <a href="#M000004" class="method-signature">
276
+ <span class="method-name">build_print_expr_stmt</span><span class="method-args">(native_expr, stag_info, etag_info)</span>
277
+ </a>
278
+ </div>
279
+
280
+ <div class="method-description">
281
+ <p>
282
+ create <a href="PrintStatement.html">PrintStatement</a> for <a
283
+ href="NativeExpression.html">NativeExpression</a>
284
+ </p>
285
+ <p><a class="source-toggle" href="#"
286
+ onclick="toggleCode('M000004-source');return false;">[Source]</a></p>
287
+ <div class="method-source-code" id="M000004-source">
288
+ <pre>
289
+ <span class="ruby-comment cmt"># File kwartz/converter.rb, line 337</span>
290
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">build_print_expr_stmt</span>(<span class="ruby-identifier">native_expr</span>, <span class="ruby-identifier">stag_info</span>, <span class="ruby-identifier">etag_info</span>)
291
+ <span class="ruby-identifier">head_space</span> = (<span class="ruby-identifier">stag_info</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">etag_info</span>).<span class="ruby-identifier">head_space</span>
292
+ <span class="ruby-identifier">tail_space</span> = (<span class="ruby-identifier">etag_info</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">stag_info</span>).<span class="ruby-identifier">tail_space</span>
293
+ <span class="ruby-identifier">args</span> = []
294
+ <span class="ruby-identifier">args</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">head_space</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">head_space</span> <span class="ruby-comment cmt"># TexExpression.new(head_space)</span>
295
+ <span class="ruby-identifier">args</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">native_expr</span>
296
+ <span class="ruby-identifier">args</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">tail_space</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">tail_space</span> <span class="ruby-comment cmt"># TextExpression.new(tail_space)</span>
297
+ <span class="ruby-keyword kw">return</span> <span class="ruby-constant">PrintStatement</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">args</span>)
298
+ <span class="ruby-keyword kw">end</span>
299
+ </pre>
300
+ </div>
301
+ </div>
302
+ </div>
303
+
304
+ <div id="method-M000003" class="method-detail">
305
+ <a name="M000003"></a>
306
+
307
+ <div class="method-heading">
308
+ <a href="#M000003" class="method-signature">
309
+ <span class="method-name">build_print_stmt</span><span class="method-args">(taginfo, attr_info, append_exprs)</span>
310
+ </a>
311
+ </div>
312
+
313
+ <div class="method-description">
314
+ <p>
315
+ create <a href="PrintStatement.html">PrintStatement</a> for <a
316
+ href="TagInfo.html">TagInfo</a>
317
+ </p>
318
+ <p><a class="source-toggle" href="#"
319
+ onclick="toggleCode('M000003-source');return false;">[Source]</a></p>
320
+ <div class="method-source-code" id="M000003-source">
321
+ <pre>
322
+ <span class="ruby-comment cmt"># File kwartz/converter.rb, line 330</span>
323
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">build_print_stmt</span>(<span class="ruby-identifier">taginfo</span>, <span class="ruby-identifier">attr_info</span>, <span class="ruby-identifier">append_exprs</span>)
324
+ <span class="ruby-identifier">args</span> = <span class="ruby-identifier">build_print_args</span>(<span class="ruby-identifier">taginfo</span>, <span class="ruby-identifier">attr_info</span>, <span class="ruby-identifier">append_exprs</span>)
325
+ <span class="ruby-keyword kw">return</span> <span class="ruby-constant">PrintStatement</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">args</span>)
326
+ <span class="ruby-keyword kw">end</span>
327
+ </pre>
328
+ </div>
329
+ </div>
330
+ </div>
331
+
332
+ <div id="method-M000001" class="method-detail">
333
+ <a name="M000001"></a>
334
+
335
+ <div class="method-heading">
336
+ <a href="#M000001" class="method-signature">
337
+ <span class="method-name">create_text_print_stmt</span><span class="method-args">(text)</span>
338
+ </a>
339
+ </div>
340
+
341
+ <div class="method-description">
342
+ <p>
343
+ create print statement from text
344
+ </p>
345
+ <p><a class="source-toggle" href="#"
346
+ onclick="toggleCode('M000001-source');return false;">[Source]</a></p>
347
+ <div class="method-source-code" id="M000001-source">
348
+ <pre>
349
+ <span class="ruby-comment cmt"># File kwartz/converter.rb, line 283</span>
350
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">create_text_print_stmt</span>(<span class="ruby-identifier">text</span>)
351
+ <span class="ruby-keyword kw">return</span> <span class="ruby-constant">PrintStatement</span>.<span class="ruby-identifier">new</span>([<span class="ruby-identifier">text</span>])
352
+ <span class="ruby-comment cmt">#return PritnStatement.new([TextExpression.new(text)])</span>
353
+ <span class="ruby-keyword kw">end</span>
354
+ </pre>
355
+ </div>
356
+ </div>
357
+ </div>
358
+
359
+ <div id="method-M000006" class="method-detail">
360
+ <a name="M000006"></a>
361
+
362
+ <div class="method-heading">
363
+ <a href="#M000006" class="method-signature">
364
+ <span class="method-name">etag_stmt</span><span class="method-args">(handler_arg)</span>
365
+ </a>
366
+ </div>
367
+
368
+ <div class="method-description">
369
+ <p>
370
+ build print statemetn of end-tag
371
+ </p>
372
+ <p><a class="source-toggle" href="#"
373
+ onclick="toggleCode('M000006-source');return false;">[Source]</a></p>
374
+ <div class="method-source-code" id="M000006-source">
375
+ <pre>
376
+ <span class="ruby-comment cmt"># File kwartz/converter.rb, line 356</span>
377
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">etag_stmt</span>(<span class="ruby-identifier">handler_arg</span>)
378
+ <span class="ruby-identifier">arg</span> = <span class="ruby-identifier">handler_arg</span>
379
+ <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">build_print_stmt</span>(<span class="ruby-identifier">arg</span>.<span class="ruby-identifier">etag_info</span>, <span class="ruby-keyword kw">nil</span>, <span class="ruby-keyword kw">nil</span>)
380
+ <span class="ruby-keyword kw">end</span>
381
+ </pre>
382
+ </div>
383
+ </div>
384
+ </div>
385
+
386
+ <div id="method-M000005" class="method-detail">
387
+ <a name="M000005"></a>
388
+
389
+ <div class="method-heading">
390
+ <a href="#M000005" class="method-signature">
391
+ <span class="method-name">stag_stmt</span><span class="method-args">(handler_arg)</span>
392
+ </a>
393
+ </div>
394
+
395
+ <div class="method-description">
396
+ <p>
397
+ build print statement of start-tag
398
+ </p>
399
+ <p><a class="source-toggle" href="#"
400
+ onclick="toggleCode('M000005-source');return false;">[Source]</a></p>
401
+ <div class="method-source-code" id="M000005-source">
402
+ <pre>
403
+ <span class="ruby-comment cmt"># File kwartz/converter.rb, line 349</span>
404
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">stag_stmt</span>(<span class="ruby-identifier">handler_arg</span>)
405
+ <span class="ruby-identifier">arg</span> = <span class="ruby-identifier">handler_arg</span>
406
+ <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">build_print_stmt</span>(<span class="ruby-identifier">arg</span>.<span class="ruby-identifier">stag_info</span>, <span class="ruby-identifier">arg</span>.<span class="ruby-identifier">attr_info</span>, <span class="ruby-identifier">arg</span>.<span class="ruby-identifier">append_exprs</span>)
407
+ <span class="ruby-keyword kw">end</span>
408
+ </pre>
409
+ </div>
410
+ </div>
411
+ </div>
412
+
413
+ <div id="method-M000009" class="method-detail">
414
+ <a name="M000009"></a>
415
+
416
+ <div class="method-heading">
417
+ <a href="#M000009" class="method-signature">
418
+ <span class="method-name">wrap_content_with_native_stmt</span><span class="method-args">(stmt_list, handler_arg, start_code, end_code, kind=nil)</span>
419
+ </a>
420
+ </div>
421
+
422
+ <div class="method-description">
423
+ <p><a class="source-toggle" href="#"
424
+ onclick="toggleCode('M000009-source');return false;">[Source]</a></p>
425
+ <div class="method-source-code" id="M000009-source">
426
+ <pre>
427
+ <span class="ruby-comment cmt"># File kwartz/converter.rb, line 380</span>
428
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">wrap_content_with_native_stmt</span>(<span class="ruby-identifier">stmt_list</span>, <span class="ruby-identifier">handler_arg</span>, <span class="ruby-identifier">start_code</span>, <span class="ruby-identifier">end_code</span>, <span class="ruby-identifier">kind</span>=<span class="ruby-keyword kw">nil</span>)
429
+ <span class="ruby-identifier">stmt_list</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">stag_stmt</span>(<span class="ruby-identifier">handler_arg</span>)
430
+ <span class="ruby-identifier">add_native_code</span>(<span class="ruby-identifier">stmt_list</span>, <span class="ruby-identifier">start_code</span>, <span class="ruby-identifier">kind</span>)
431
+ <span class="ruby-identifier">stmt_list</span>.<span class="ruby-identifier">concat</span>(<span class="ruby-identifier">handler_arg</span>.<span class="ruby-identifier">cont_stmts</span>)
432
+ <span class="ruby-identifier">add_native_code</span>(<span class="ruby-identifier">stmt_list</span>, <span class="ruby-identifier">end_code</span>, <span class="ruby-identifier">kind</span>)
433
+ <span class="ruby-identifier">stmt_list</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">etag_stmt</span>(<span class="ruby-identifier">handler_arg</span>)
434
+ <span class="ruby-keyword kw">end</span>
435
+ </pre>
436
+ </div>
437
+ </div>
438
+ </div>
439
+
440
+ <div id="method-M000008" class="method-detail">
441
+ <a name="M000008"></a>
442
+
443
+ <div class="method-heading">
444
+ <a href="#M000008" class="method-signature">
445
+ <span class="method-name">wrap_element_with_native_stmt</span><span class="method-args">(stmt_list, handler_arg, start_code, end_code, kind=nil)</span>
446
+ </a>
447
+ </div>
448
+
449
+ <div class="method-description">
450
+ <p><a class="source-toggle" href="#"
451
+ onclick="toggleCode('M000008-source');return false;">[Source]</a></p>
452
+ <div class="method-source-code" id="M000008-source">
453
+ <pre>
454
+ <span class="ruby-comment cmt"># File kwartz/converter.rb, line 371</span>
455
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">wrap_element_with_native_stmt</span>(<span class="ruby-identifier">stmt_list</span>, <span class="ruby-identifier">handler_arg</span>, <span class="ruby-identifier">start_code</span>, <span class="ruby-identifier">end_code</span>, <span class="ruby-identifier">kind</span>=<span class="ruby-keyword kw">nil</span>)
456
+ <span class="ruby-identifier">add_native_code</span>(<span class="ruby-identifier">stmt_list</span>, <span class="ruby-identifier">start_code</span>, <span class="ruby-identifier">kind</span>)
457
+ <span class="ruby-identifier">stmt_list</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">stag_stmt</span>(<span class="ruby-identifier">handler_arg</span>)
458
+ <span class="ruby-identifier">stmt_list</span>.<span class="ruby-identifier">concat</span>(<span class="ruby-identifier">handler_arg</span>.<span class="ruby-identifier">cont_stmts</span>)
459
+ <span class="ruby-identifier">stmt_list</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">etag_stmt</span>(<span class="ruby-identifier">handler_arg</span>)
460
+ <span class="ruby-identifier">add_native_code</span>(<span class="ruby-identifier">stmt_list</span>, <span class="ruby-identifier">end_code</span>, <span class="ruby-identifier">kind</span>)
461
+ <span class="ruby-keyword kw">end</span>
462
+ </pre>
463
+ </div>
464
+ </div>
465
+ </div>
466
+
467
+
468
+ </div>
469
+
470
+
471
+ </div>
472
+
473
+
474
+ <div id="validator-badges">
475
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
476
+ </div>
477
+
478
+ </body>
479
+ </html>