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
@@ -95,9 +95,9 @@ href="NativeExpression.html">NativeExpression</a>
95
95
  <h3 class="section-bar">Methods</h3>
96
96
 
97
97
  <div class="name-list">
98
- <a href="#M000046">_inspect</a>&nbsp;&nbsp;
99
- <a href="#M000047">accept</a>&nbsp;&nbsp;
100
- <a href="#M000045">new</a>&nbsp;&nbsp;
98
+ <a href="#M000082">_inspect</a>&nbsp;&nbsp;
99
+ <a href="#M000083">accept</a>&nbsp;&nbsp;
100
+ <a href="#M000081">new</a>&nbsp;&nbsp;
101
101
  </div>
102
102
  </div>
103
103
 
@@ -132,19 +132,19 @@ href="NativeExpression.html">NativeExpression</a>
132
132
  <div id="methods">
133
133
  <h3 class="section-bar">Public Class methods</h3>
134
134
 
135
- <div id="method-M000045" class="method-detail">
136
- <a name="M000045"></a>
135
+ <div id="method-M000081" class="method-detail">
136
+ <a name="M000081"></a>
137
137
 
138
138
  <div class="method-heading">
139
- <a href="#M000045" class="method-signature">
139
+ <a href="#M000081" class="method-signature">
140
140
  <span class="method-name">new</span><span class="method-args">(args)</span>
141
141
  </a>
142
142
  </div>
143
143
 
144
144
  <div class="method-description">
145
145
  <p><a class="source-toggle" href="#"
146
- onclick="toggleCode('M000045-source');return false;">[Source]</a></p>
147
- <div class="method-source-code" id="M000045-source">
146
+ onclick="toggleCode('M000081-source');return false;">[Source]</a></p>
147
+ <div class="method-source-code" id="M000081-source">
148
148
  <pre>
149
149
  <span class="ruby-comment cmt"># File kwartz/node.rb, line 179</span>
150
150
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">args</span>)
@@ -157,45 +157,45 @@ href="NativeExpression.html">NativeExpression</a>
157
157
 
158
158
  <h3 class="section-bar">Public Instance methods</h3>
159
159
 
160
- <div id="method-M000046" class="method-detail">
161
- <a name="M000046"></a>
160
+ <div id="method-M000082" class="method-detail">
161
+ <a name="M000082"></a>
162
162
 
163
163
  <div class="method-heading">
164
- <a href="#M000046" class="method-signature">
164
+ <a href="#M000082" class="method-signature">
165
165
  <span class="method-name">_inspect</span><span class="method-args">(indent=0)</span>
166
166
  </a>
167
167
  </div>
168
168
 
169
169
  <div class="method-description">
170
170
  <p><a class="source-toggle" href="#"
171
- onclick="toggleCode('M000046-source');return false;">[Source]</a></p>
172
- <div class="method-source-code" id="M000046-source">
171
+ onclick="toggleCode('M000082-source');return false;">[Source]</a></p>
172
+ <div class="method-source-code" id="M000082-source">
173
173
  <pre>
174
174
  <span class="ruby-comment cmt"># File kwartz/node.rb, line 185</span>
175
175
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">_inspect</span>(<span class="ruby-identifier">indent</span>=<span class="ruby-value">0</span>)
176
176
  <span class="ruby-identifier">list</span> = <span class="ruby-ivar">@args</span>.<span class="ruby-identifier">collect</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">arg</span><span class="ruby-operator">|</span>
177
177
  <span class="ruby-identifier">arg</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">NativeExpression</span>) <span class="ruby-operator">?</span> <span class="ruby-node">&quot;&lt;%=#{arg.code}%&gt;&quot;</span> <span class="ruby-operator">:</span> <span class="ruby-identifier">arg</span>.<span class="ruby-identifier">inspect</span>
178
178
  }
179
- <span class="ruby-keyword kw">return</span> <span class="ruby-value str">&quot;[ &quot;</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">list</span>.<span class="ruby-identifier">join</span>(<span class="ruby-value str">', '</span>) <span class="ruby-operator">+</span> <span class="ruby-value str">&quot;]&quot;</span>
179
+ <span class="ruby-keyword kw">return</span> <span class="ruby-value str">&quot;print(&quot;</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">list</span>.<span class="ruby-identifier">join</span>(<span class="ruby-value str">', '</span>) <span class="ruby-operator">+</span> <span class="ruby-value str">&quot;)\n&quot;</span>
180
180
  <span class="ruby-keyword kw">end</span>
181
181
  </pre>
182
182
  </div>
183
183
  </div>
184
184
  </div>
185
185
 
186
- <div id="method-M000047" class="method-detail">
187
- <a name="M000047"></a>
186
+ <div id="method-M000083" class="method-detail">
187
+ <a name="M000083"></a>
188
188
 
189
189
  <div class="method-heading">
190
- <a href="#M000047" class="method-signature">
190
+ <a href="#M000083" class="method-signature">
191
191
  <span class="method-name">accept</span><span class="method-args">(translator)</span>
192
192
  </a>
193
193
  </div>
194
194
 
195
195
  <div class="method-description">
196
196
  <p><a class="source-toggle" href="#"
197
- onclick="toggleCode('M000047-source');return false;">[Source]</a></p>
198
- <div class="method-source-code" id="M000047-source">
197
+ onclick="toggleCode('M000083-source');return false;">[Source]</a></p>
198
+ <div class="method-source-code" id="M000083-source">
199
199
  <pre>
200
200
  <span class="ruby-comment cmt"># File kwartz/node.rb, line 193</span>
201
201
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">accept</span>(<span class="ruby-identifier">translator</span>)
@@ -95,65 +95,65 @@ directive examples.
95
95
  </p>
96
96
  <pre>
97
97
  ## text_field, password_field
98
- &lt;input type=&quot;text&quot; size=&quot;10&quot; maxsize=&quot;20&quot; title=&quot;text_field 'user', 'name'&quot;&gt;
98
+ &lt;input type=&quot;text&quot; size=&quot;10&quot; maxsize=&quot;20&quot; kw:d=&quot;text_field 'user', 'name'&quot;&gt;
99
99
  =&gt; &lt;%= text_field 'user', 'name', :size=&gt;10, :maxsize=&gt;20 %&gt;
100
- &lt;input type=&quot;text&quot; name=&quot;user[name]&quot; title=&quot;text_field :size=&gt;10&quot;&gt;
100
+ &lt;input type=&quot;text&quot; name=&quot;user[name]&quot; kw:d=&quot;text_field :size=&gt;10&quot;&gt;
101
101
  =&gt; &lt;%= text_field &quot;user&quot;, &quot;name&quot;, :size=&gt;10 %&gt;
102
- &lt;input type=&quot;text&quot; id=&quot;user_name&quot; size=&quot;10&quot; title=&quot;text_field&quot;&gt;
102
+ &lt;input type=&quot;text&quot; id=&quot;user_name&quot; size=&quot;10&quot; kw:d=&quot;text_field&quot;&gt;
103
103
  =&gt; &lt;%= text_field &quot;user&quot;, &quot;name&quot;, :size=&gt;10 %&gt;
104
104
 
105
105
  ## link_to, link_to_remote
106
- &lt;a href=&quot;#&quot; title=&quot;link_to :action=&gt;'list'&quot;&gt;Show list&lt;/a&gt;
106
+ &lt;a href=&quot;#&quot; kw:d=&quot;link_to :action=&gt;'list'&quot;&gt;Show list&lt;/a&gt;
107
107
  =&gt; &lt;%= link_to 'Show list', :action=&gt;'list' %&gt;
108
108
 
109
- ## start_link_to, start_link_to_remote
110
- &lt;a href=&quot;#&quot; title=&quot;start_link_to :action=&gt;'list'&quot;&gt;Show list&lt;/a&gt;
111
- =&gt; &lt;%= start_link_to 'action'=&gt;'list' %&gt;Show list&lt;/a&gt;
109
+ ## start_link_tag, start_remote_link_tag
110
+ &lt;a href=&quot;#&quot; kw:d=&quot;start_link_tag :action=&gt;'list'&quot;&gt;Show list&lt;/a&gt;
111
+ =&gt; &lt;%= start_link_tag 'action'=&gt;'list' %&gt;Show list&lt;/a&gt;
112
112
 
113
113
  ## mail_to
114
- &lt;a href=&quot;mail:www@example.com&quot; title=&quot;mail_to&quot;&gt;admin&lt;/a&gt;
114
+ &lt;a href=&quot;mail:www@example.com&quot; kw:d=&quot;mail_to&quot;&gt;admin&lt;/a&gt;
115
115
  =&gt; &lt;%= mail_to &quot;www@example.com&quot;, &quot;admin&quot; %&gt;
116
116
 
117
117
  ## form_tag
118
- &lt;form action=&quot;show&quot; title=&quot;form_tag :id=&gt;2&quot;&gt; ... &lt;/form&gt;
118
+ &lt;form action=&quot;show&quot; kw:d=&quot;form_tag :id=&gt;2&quot;&gt; ... &lt;/form&gt;
119
119
  =&gt; &lt;%= form_tag :action=&gt;&quot;show&quot;, :id=&gt;2 %&gt; ... &lt;/form&gt;
120
120
 
121
121
  ## submit_tag
122
- &lt;input type=&quot;submit&quot; value=&quot;OK&quot; title=&quot;submit_tag&quot;&gt;
122
+ &lt;input type=&quot;submit&quot; value=&quot;OK&quot; kw:d=&quot;submit_tag&quot;&gt;
123
123
  =&gt; &lt;%= submit_tag &quot;OK&quot; %&gt;
124
124
 
125
125
  ## text_area
126
- &lt;textarea cols=&quot;30&quot; rows=&quot;3&quot; id=&quot;user_desc&quot; title=&quot;text_area&quot;&gt;&lt;/textarea&gt;
126
+ &lt;textarea cols=&quot;30&quot; rows=&quot;3&quot; id=&quot;user_desc&quot; kw:d=&quot;text_area&quot;&gt;&lt;/textarea&gt;
127
127
  =&gt; &lt;%= text_area &quot;user&quot;, &quot;desc&quot;, :cols=&gt;30, :rows=&gt;3 %&gt;
128
- &lt;textarea cols=&quot;30&quot; rows=&quot;3&quot; name=&quot;user[desc]&quot; title=&quot;text_area&quot;&gt;&lt;/textarea&gt;
128
+ &lt;textarea cols=&quot;30&quot; rows=&quot;3&quot; name=&quot;user[desc]&quot; kw:d=&quot;text_area&quot;&gt;&lt;/textarea&gt;
129
129
  =&gt; &lt;%= text_area &quot;user&quot;, &quot;desc&quot;, :cols=&gt;30, :rows=&gt;3 %&gt;
130
130
 
131
131
  ## hidden_field
132
- &lt;input type=&quot;hidden&quot; id=&quot;user_id&quot; title=&quot;hidden_field&quot;&gt;
132
+ &lt;input type=&quot;hidden&quot; id=&quot;user_id&quot; kw:d=&quot;hidden_field&quot;&gt;
133
133
  =&gt; &lt;%= hidden_field &quot;user&quot;, &quot;id&quot; %&gt;
134
- &lt;input type=&quot;hidden&quot; name=&quot;user[id]&quot; title=&quot;hidden_field&quot;&gt;
134
+ &lt;input type=&quot;hidden&quot; name=&quot;user[id]&quot; kw:d=&quot;hidden_field&quot;&gt;
135
135
  =&gt; &lt;%= hidden_field &quot;user&quot;, &quot;id&quot; %&gt;
136
136
 
137
137
  ## check_box
138
- &lt;input type=&quot;checkbox&quot; id=&quot;user_chk1&quot; title=&quot;check_box&quot;&gt;
138
+ &lt;input type=&quot;checkbox&quot; id=&quot;user_chk1&quot; kw:d=&quot;check_box&quot;&gt;
139
139
  =&gt; &lt;%= check_box &quot;user&quot;, &quot;chk1&quot; %&gt;
140
- &lt;input type=&quot;checkbox&quot; name=&quot;user[chk2]&quot; title=&quot;check_box&quot;&gt;
140
+ &lt;input type=&quot;checkbox&quot; name=&quot;user[chk2]&quot; kw:d=&quot;check_box&quot;&gt;
141
141
  =&gt; &lt;%= check_box &quot;user&quot;, &quot;chk2&quot; %&gt;
142
142
 
143
143
  ## radio_button
144
- &lt;input type=&quot;radio&quot; id=&quot;user_radio&quot; value=&quot;val1&quot; title=&quot;radio_button&quot;&gt;
144
+ &lt;input type=&quot;radio&quot; id=&quot;user_radio&quot; value=&quot;val1&quot; kw:d=&quot;radio_button&quot;&gt;
145
145
  =&gt; &lt;%= radio_button &quot;user&quot;, &quot;radio&quot;, &quot;val1&quot; %&gt;
146
- &lt;input type=&quot;radio&quot; name=&quot;user[radio]&quot; value=&quot;val2&quot; title=&quot;radio_button&quot;&gt;
146
+ &lt;input type=&quot;radio&quot; name=&quot;user[radio]&quot; value=&quot;val2&quot; kw:d=&quot;radio_button&quot;&gt;
147
147
  =&gt; &lt;%= radio_button &quot;user&quot;, &quot;radio&quot;, &quot;val2&quot; %&gt;
148
148
 
149
149
  ## select, collection_select, country_select, time_zone_select, date_select, datetime_select
150
- &lt;select name=&quot;user[birth]&quot; title=&quot;date_select :start_year=&gt;1970&quot;&gt;
150
+ &lt;select name=&quot;user[birth]&quot; kw:d=&quot;date_select :start_year=&gt;1970&quot;&gt;
151
151
  &lt;option value=&quot;2000&quot;&gt;2000&lt;/option&gt;
152
152
  &lt;/select&gt;
153
153
  =&gt; &lt;% date_select &quot;user&quot;, &quot;birth&quot;, :start_year=&gt;1970 %&gt;
154
154
 
155
155
  ## image_tag, link_image_to, link_to_image
156
- &lt;img src=&quot;foo.gif&quot; alt=&quot;text&quot; width=&quot;20&quot; heigth=&quot;10&quot; title=&quot;image_tag :size=&gt;'30x40'&quot;&gt;
156
+ &lt;img src=&quot;foo.gif&quot; alt=&quot;text&quot; width=&quot;20&quot; heigth=&quot;10&quot; kw:d=&quot;image_tag :size=&gt;'30x40'&quot;&gt;
157
157
  =&gt; &lt;%= image_tag &quot;foo.gif&quot;, :alt=&gt;&quot;text&quot;, :size=&gt;'30x40' %&gt;
158
158
  </pre>
159
159
 
@@ -166,17 +166,17 @@ directive examples.
166
166
  <h3 class="section-bar">Methods</h3>
167
167
 
168
168
  <div class="name-list">
169
- <a href="#M000165">add_directive_attr_as_arg</a>&nbsp;&nbsp;
170
- <a href="#M000166">add_directive_attr_as_option</a>&nbsp;&nbsp;
171
- <a href="#M000167">add_directive_content_as_arg</a>&nbsp;&nbsp;
172
- <a href="#M000169">add_directive_expr_option</a>&nbsp;&nbsp;
173
- <a href="#M000168">add_directive_integer_option</a>&nbsp;&nbsp;
174
- <a href="#M000163">add_directive_object_and_method</a>&nbsp;&nbsp;
175
- <a href="#M000164">add_directive_object_and_method_and_value</a>&nbsp;&nbsp;
176
- <a href="#M000170">add_directive_str_option</a>&nbsp;&nbsp;
177
- <a href="#M000161">handle</a>&nbsp;&nbsp;
178
- <a href="#M000171">print_directive</a>&nbsp;&nbsp;
179
- <a href="#M000162">quote</a>&nbsp;&nbsp;
169
+ <a href="#M000217">add_directive_attr_as_arg</a>&nbsp;&nbsp;
170
+ <a href="#M000218">add_directive_attr_as_option</a>&nbsp;&nbsp;
171
+ <a href="#M000219">add_directive_content_as_arg</a>&nbsp;&nbsp;
172
+ <a href="#M000221">add_directive_expr_option</a>&nbsp;&nbsp;
173
+ <a href="#M000220">add_directive_integer_option</a>&nbsp;&nbsp;
174
+ <a href="#M000215">add_directive_object_and_method</a>&nbsp;&nbsp;
175
+ <a href="#M000216">add_directive_object_and_method_and_value</a>&nbsp;&nbsp;
176
+ <a href="#M000222">add_directive_str_option</a>&nbsp;&nbsp;
177
+ <a href="#M000213">handle</a>&nbsp;&nbsp;
178
+ <a href="#M000223">print_directive</a>&nbsp;&nbsp;
179
+ <a href="#M000214">quote</a>&nbsp;&nbsp;
180
180
  </div>
181
181
  </div>
182
182
 
@@ -198,12 +198,12 @@ directive examples.
198
198
  <div id="methods">
199
199
  <h3 class="section-bar">Public Instance methods</h3>
200
200
 
201
- <div id="method-M000161" class="method-detail">
202
- <a name="M000161"></a>
201
+ <div id="method-M000213" class="method-detail">
202
+ <a name="M000213"></a>
203
203
 
204
204
  <div class="method-heading">
205
- <a href="#M000161" class="method-signature">
206
- <span class="method-name">handle</span><span class="method-args">(directive_name, directive_arg, directive_str, stag_info, etag_info, cont_stmts, attr_info, append_exprs, stmt_list)</span>
205
+ <a href="#M000213" class="method-signature">
206
+ <span class="method-name">handle</span><span class="method-args">(stmt_list, handler_arg)</span>
207
207
  </a>
208
208
  </div>
209
209
 
@@ -215,20 +215,22 @@ handle directives for rails.
215
215
  everytime return true whenever directive name is unknown.
216
216
  </p>
217
217
  <p><a class="source-toggle" href="#"
218
- onclick="toggleCode('M000161-source');return false;">[Source]</a></p>
219
- <div class="method-source-code" id="M000161-source">
218
+ onclick="toggleCode('M000213-source');return false;">[Source]</a></p>
219
+ <div class="method-source-code" id="M000213-source">
220
220
  <pre>
221
221
  <span class="ruby-comment cmt"># File kwartz/binding/rails.rb, line 96</span>
222
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">handle</span>(<span class="ruby-identifier">directive_name</span>, <span class="ruby-identifier">directive_arg</span>, <span class="ruby-identifier">directive_str</span>, <span class="ruby-identifier">stag_info</span>, <span class="ruby-identifier">etag_info</span>, <span class="ruby-identifier">cont_stmts</span>, <span class="ruby-identifier">attr_info</span>, <span class="ruby-identifier">append_exprs</span>, <span class="ruby-identifier">stmt_list</span>)
222
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">handle</span>(<span class="ruby-identifier">stmt_list</span>, <span class="ruby-identifier">handler_arg</span>)
223
223
  <span class="ruby-identifier">ret</span> = <span class="ruby-keyword kw">super</span>
224
224
  <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">ret</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">ret</span>
225
225
 
226
- <span class="ruby-identifier">d_name</span> = <span class="ruby-identifier">directive_name</span>
227
- <span class="ruby-identifier">d_arg</span> = <span class="ruby-identifier">directive_arg</span>
228
- <span class="ruby-identifier">d_str</span> = <span class="ruby-identifier">directive_str</span>
226
+ <span class="ruby-identifier">arg</span> = <span class="ruby-identifier">handler_arg</span>
227
+ <span class="ruby-identifier">d_name</span> = <span class="ruby-identifier">arg</span>.<span class="ruby-identifier">directive_name</span>
228
+ <span class="ruby-identifier">d_arg</span> = <span class="ruby-identifier">arg</span>.<span class="ruby-identifier">directive_arg</span>
229
+ <span class="ruby-identifier">d_str</span> = <span class="ruby-identifier">arg</span>.<span class="ruby-identifier">directive_str</span>
230
+ <span class="ruby-identifier">attr_info</span> = <span class="ruby-identifier">arg</span>.<span class="ruby-identifier">attr_info</span>
229
231
 
230
232
  <span class="ruby-comment cmt">## parse 'name=&quot;user[name]&quot;' or 'id=&quot;user_name&quot;'</span>
231
- <span class="ruby-keyword kw">case</span> <span class="ruby-identifier">directive_name</span>.<span class="ruby-identifier">to_s</span>
233
+ <span class="ruby-keyword kw">case</span> <span class="ruby-identifier">d_name</span>.<span class="ruby-identifier">to_s</span>
232
234
  <span class="ruby-keyword kw">when</span> <span class="ruby-regexp re">/(_|\A)radio_button\z/</span>
233
235
  <span class="ruby-identifier">add_directive_object_and_method_and_value</span>(<span class="ruby-identifier">d_arg</span>, <span class="ruby-identifier">attr_info</span>)
234
236
  <span class="ruby-keyword kw">when</span> <span class="ruby-regexp re">/_field\z/</span>, <span class="ruby-regexp re">/_area\z/</span>, <span class="ruby-regexp re">/_box\z/</span>, <span class="ruby-regexp re">/(_|\A)select\z/</span>, <span class="ruby-value str">'input'</span>
@@ -236,9 +238,9 @@ everytime return true whenever directive name is unknown.
236
238
  <span class="ruby-keyword kw">end</span>
237
239
 
238
240
  <span class="ruby-comment cmt">## replace whole element, or only start tag</span>
239
- <span class="ruby-identifier">replace_elem</span> = <span class="ruby-identifier">directive_name</span>.<span class="ruby-identifier">to_s</span> <span class="ruby-operator">!~</span> <span class="ruby-regexp re">/\Astart_/</span>
241
+ <span class="ruby-identifier">replace_elem</span> = <span class="ruby-identifier">d_name</span>.<span class="ruby-identifier">to_s</span> <span class="ruby-operator">!~</span> <span class="ruby-regexp re">/\Astart_/</span>
240
242
 
241
- <span class="ruby-keyword kw">case</span> <span class="ruby-identifier">directive_name</span>
243
+ <span class="ruby-keyword kw">case</span> <span class="ruby-identifier">d_name</span>
242
244
 
243
245
  <span class="ruby-keyword kw">when</span> <span class="ruby-identifier">:text_field</span>, <span class="ruby-identifier">:password_field</span>, <span class="ruby-identifier">:hidden_field</span>
244
246
  <span class="ruby-comment cmt">#add_directive_object_and_method(d_arg, attr_info)</span>
@@ -250,13 +252,13 @@ everytime return true whenever directive name is unknown.
250
252
  <span class="ruby-identifier">add_directive_integer_option</span>(<span class="ruby-identifier">d_arg</span>, <span class="ruby-value str">'size'</span>, <span class="ruby-identifier">attr_info</span>[<span class="ruby-value str">'size'</span>])
251
253
 
252
254
  <span class="ruby-keyword kw">when</span> <span class="ruby-identifier">:link_to</span>, <span class="ruby-identifier">:link_to_remote</span>, <span class="ruby-identifier">:link_to_unless_current</span>
253
- <span class="ruby-identifier">add_directive_content_as_arg</span>(<span class="ruby-identifier">d_arg</span>, <span class="ruby-identifier">cont_stmts</span>)
255
+ <span class="ruby-identifier">add_directive_content_as_arg</span>(<span class="ruby-identifier">d_arg</span>, <span class="ruby-identifier">arg</span>.<span class="ruby-identifier">cont_stmts</span>)
254
256
 
255
257
  <span class="ruby-keyword kw">when</span> <span class="ruby-identifier">:anchor</span>, <span class="ruby-identifier">:anchor_remote</span>
256
258
  <span class="ruby-identifier">replace_elem</span> = <span class="ruby-keyword kw">false</span>
257
259
 
258
260
  <span class="ruby-keyword kw">when</span> <span class="ruby-identifier">:mail_to</span>
259
- <span class="ruby-identifier">add_directive_content_as_arg</span>(<span class="ruby-identifier">d_arg</span>, <span class="ruby-identifier">cont_stmts</span>)
261
+ <span class="ruby-identifier">add_directive_content_as_arg</span>(<span class="ruby-identifier">d_arg</span>, <span class="ruby-identifier">arg</span>.<span class="ruby-identifier">cont_stmts</span>)
260
262
  <span class="ruby-identifier">add_directive_attr_as_arg</span>(<span class="ruby-identifier">d_arg</span>, <span class="ruby-identifier">attr_info</span>, <span class="ruby-value str">'href'</span>)
261
263
  <span class="ruby-identifier">d_arg</span>.<span class="ruby-identifier">sub!</span>(<span class="ruby-regexp re">/\A\'mailto:/</span>, <span class="ruby-value str">&quot;'&quot;</span>)
262
264
 
@@ -294,7 +296,7 @@ everytime return true whenever directive name is unknown.
294
296
  <span class="ruby-keyword kw">end</span> <span class="ruby-comment cmt">#case</span>
295
297
 
296
298
  <span class="ruby-comment cmt">##</span>
297
- <span class="ruby-identifier">print_directive</span>(<span class="ruby-identifier">d_name</span>, <span class="ruby-identifier">d_arg</span>, <span class="ruby-identifier">stag_info</span>, <span class="ruby-identifier">etag_info</span>, <span class="ruby-identifier">cont_stmts</span>, <span class="ruby-identifier">attr_info</span>, <span class="ruby-identifier">stmt_list</span>, <span class="ruby-identifier">replace_elem</span>)
299
+ <span class="ruby-identifier">print_directive</span>(<span class="ruby-identifier">stmt_list</span>, <span class="ruby-identifier">arg</span>, <span class="ruby-identifier">replace_elem</span>)
298
300
 
299
301
  <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">true</span> <span class="ruby-comment cmt"># everytime return true</span>
300
302
 
@@ -306,21 +308,21 @@ everytime return true whenever directive name is unknown.
306
308
 
307
309
  <h3 class="section-bar">Protected Instance methods</h3>
308
310
 
309
- <div id="method-M000165" class="method-detail">
310
- <a name="M000165"></a>
311
+ <div id="method-M000217" class="method-detail">
312
+ <a name="M000217"></a>
311
313
 
312
314
  <div class="method-heading">
313
- <a href="#M000165" class="method-signature">
315
+ <a href="#M000217" class="method-signature">
314
316
  <span class="method-name">add_directive_attr_as_arg</span><span class="method-args">(d_arg, attr_info, attr_name)</span>
315
317
  </a>
316
318
  </div>
317
319
 
318
320
  <div class="method-description">
319
321
  <p><a class="source-toggle" href="#"
320
- onclick="toggleCode('M000165-source');return false;">[Source]</a></p>
321
- <div class="method-source-code" id="M000165-source">
322
+ onclick="toggleCode('M000217-source');return false;">[Source]</a></p>
323
+ <div class="method-source-code" id="M000217-source">
322
324
  <pre>
323
- <span class="ruby-comment cmt"># File kwartz/binding/rails.rb, line 204</span>
325
+ <span class="ruby-comment cmt"># File kwartz/binding/rails.rb, line 206</span>
324
326
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">add_directive_attr_as_arg</span>(<span class="ruby-identifier">d_arg</span>, <span class="ruby-identifier">attr_info</span>, <span class="ruby-identifier">attr_name</span>)
325
327
  <span class="ruby-keyword kw">if</span> (<span class="ruby-identifier">v</span> = <span class="ruby-identifier">attr_info</span>[<span class="ruby-identifier">attr_name</span>]) <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-operator">!</span><span class="ruby-identifier">v</span>.<span class="ruby-identifier">empty?</span>
326
328
  <span class="ruby-identifier">d_arg</span>[<span class="ruby-value">0</span>,<span class="ruby-value">0</span>] = <span class="ruby-node">&quot;#{quote(v)}#{d_arg.empty? ? '' : ', '}&quot;</span>
@@ -331,21 +333,21 @@ everytime return true whenever directive name is unknown.
331
333
  </div>
332
334
  </div>
333
335
 
334
- <div id="method-M000166" class="method-detail">
335
- <a name="M000166"></a>
336
+ <div id="method-M000218" class="method-detail">
337
+ <a name="M000218"></a>
336
338
 
337
339
  <div class="method-heading">
338
- <a href="#M000166" class="method-signature">
340
+ <a href="#M000218" class="method-signature">
339
341
  <span class="method-name">add_directive_attr_as_option</span><span class="method-args">(d_arg, attr_info, attr_name)</span>
340
342
  </a>
341
343
  </div>
342
344
 
343
345
  <div class="method-description">
344
346
  <p><a class="source-toggle" href="#"
345
- onclick="toggleCode('M000166-source');return false;">[Source]</a></p>
346
- <div class="method-source-code" id="M000166-source">
347
+ onclick="toggleCode('M000218-source');return false;">[Source]</a></p>
348
+ <div class="method-source-code" id="M000218-source">
347
349
  <pre>
348
- <span class="ruby-comment cmt"># File kwartz/binding/rails.rb, line 211</span>
350
+ <span class="ruby-comment cmt"># File kwartz/binding/rails.rb, line 213</span>
349
351
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">add_directive_attr_as_option</span>(<span class="ruby-identifier">d_arg</span>, <span class="ruby-identifier">attr_info</span>, <span class="ruby-identifier">attr_name</span>)
350
352
  <span class="ruby-keyword kw">if</span> (<span class="ruby-identifier">s</span> = <span class="ruby-identifier">attr_info</span>[<span class="ruby-identifier">attr_name</span>]) <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-operator">!</span><span class="ruby-identifier">d_arg</span>.<span class="ruby-identifier">index</span>(<span class="ruby-identifier">attr_name</span>)
351
353
  <span class="ruby-identifier">d_arg</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-value str">&quot;, &quot;</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">d_arg</span>.<span class="ruby-identifier">empty?</span>
@@ -357,21 +359,21 @@ everytime return true whenever directive name is unknown.
357
359
  </div>
358
360
  </div>
359
361
 
360
- <div id="method-M000167" class="method-detail">
361
- <a name="M000167"></a>
362
+ <div id="method-M000219" class="method-detail">
363
+ <a name="M000219"></a>
362
364
 
363
365
  <div class="method-heading">
364
- <a href="#M000167" class="method-signature">
366
+ <a href="#M000219" class="method-signature">
365
367
  <span class="method-name">add_directive_content_as_arg</span><span class="method-args">(d_arg, cont_stmts)</span>
366
368
  </a>
367
369
  </div>
368
370
 
369
371
  <div class="method-description">
370
372
  <p><a class="source-toggle" href="#"
371
- onclick="toggleCode('M000167-source');return false;">[Source]</a></p>
372
- <div class="method-source-code" id="M000167-source">
373
+ onclick="toggleCode('M000219-source');return false;">[Source]</a></p>
374
+ <div class="method-source-code" id="M000219-source">
373
375
  <pre>
374
- <span class="ruby-comment cmt"># File kwartz/binding/rails.rb, line 219</span>
376
+ <span class="ruby-comment cmt"># File kwartz/binding/rails.rb, line 221</span>
375
377
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">add_directive_content_as_arg</span>(<span class="ruby-identifier">d_arg</span>, <span class="ruby-identifier">cont_stmts</span>)
376
378
  <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">d_arg</span>.<span class="ruby-identifier">empty?</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">d_arg</span>[<span class="ruby-value">0</span>] <span class="ruby-operator">==</span> <span class="ruby-value">?:</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">d_arg</span>[<span class="ruby-value">0</span>] <span class="ruby-operator">==</span> <span class="ruby-value">?{</span>
377
379
  <span class="ruby-identifier">print_stmt</span> = <span class="ruby-identifier">cont_stmts</span>[<span class="ruby-value">0</span>]
@@ -384,21 +386,21 @@ everytime return true whenever directive name is unknown.
384
386
  </div>
385
387
  </div>
386
388
 
387
- <div id="method-M000169" class="method-detail">
388
- <a name="M000169"></a>
389
+ <div id="method-M000221" class="method-detail">
390
+ <a name="M000221"></a>
389
391
 
390
392
  <div class="method-heading">
391
- <a href="#M000169" class="method-signature">
393
+ <a href="#M000221" class="method-signature">
392
394
  <span class="method-name">add_directive_expr_option</span><span class="method-args">(directive_arg, attr_name, attr_value)</span>
393
395
  </a>
394
396
  </div>
395
397
 
396
398
  <div class="method-description">
397
399
  <p><a class="source-toggle" href="#"
398
- onclick="toggleCode('M000169-source');return false;">[Source]</a></p>
399
- <div class="method-source-code" id="M000169-source">
400
+ onclick="toggleCode('M000221-source');return false;">[Source]</a></p>
401
+ <div class="method-source-code" id="M000221-source">
400
402
  <pre>
401
- <span class="ruby-comment cmt"># File kwartz/binding/rails.rb, line 236</span>
403
+ <span class="ruby-comment cmt"># File kwartz/binding/rails.rb, line 238</span>
402
404
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">add_directive_expr_option</span>(<span class="ruby-identifier">directive_arg</span>, <span class="ruby-identifier">attr_name</span>, <span class="ruby-identifier">attr_value</span>)
403
405
  <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">attr_value</span>
404
406
  <span class="ruby-identifier">directive_arg</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-value str">', '</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">directive_arg</span>.<span class="ruby-identifier">empty?</span>
@@ -410,21 +412,21 @@ everytime return true whenever directive name is unknown.
410
412
  </div>
411
413
  </div>
412
414
 
413
- <div id="method-M000168" class="method-detail">
414
- <a name="M000168"></a>
415
+ <div id="method-M000220" class="method-detail">
416
+ <a name="M000220"></a>
415
417
 
416
418
  <div class="method-heading">
417
- <a href="#M000168" class="method-signature">
419
+ <a href="#M000220" class="method-signature">
418
420
  <span class="method-name">add_directive_integer_option</span><span class="method-args">(directive_arg, attr_name, attr_value)</span>
419
421
  </a>
420
422
  </div>
421
423
 
422
424
  <div class="method-description">
423
425
  <p><a class="source-toggle" href="#"
424
- onclick="toggleCode('M000168-source');return false;">[Source]</a></p>
425
- <div class="method-source-code" id="M000168-source">
426
+ onclick="toggleCode('M000220-source');return false;">[Source]</a></p>
427
+ <div class="method-source-code" id="M000220-source">
426
428
  <pre>
427
- <span class="ruby-comment cmt"># File kwartz/binding/rails.rb, line 228</span>
429
+ <span class="ruby-comment cmt"># File kwartz/binding/rails.rb, line 230</span>
428
430
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">add_directive_integer_option</span>(<span class="ruby-identifier">directive_arg</span>, <span class="ruby-identifier">attr_name</span>, <span class="ruby-identifier">attr_value</span>)
429
431
  <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">attr_value</span> <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-identifier">attr_value</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/\A\d+\z/</span>
430
432
  <span class="ruby-identifier">directive_arg</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-value str">', '</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">directive_arg</span>.<span class="ruby-identifier">empty?</span>
@@ -436,21 +438,21 @@ everytime return true whenever directive name is unknown.
436
438
  </div>
437
439
  </div>
438
440
 
439
- <div id="method-M000163" class="method-detail">
440
- <a name="M000163"></a>
441
+ <div id="method-M000215" class="method-detail">
442
+ <a name="M000215"></a>
441
443
 
442
444
  <div class="method-heading">
443
- <a href="#M000163" class="method-signature">
445
+ <a href="#M000215" class="method-signature">
444
446
  <span class="method-name">add_directive_object_and_method</span><span class="method-args">(d_arg, attr_info)</span>
445
447
  </a>
446
448
  </div>
447
449
 
448
450
  <div class="method-description">
449
451
  <p><a class="source-toggle" href="#"
450
- onclick="toggleCode('M000163-source');return false;">[Source]</a></p>
451
- <div class="method-source-code" id="M000163-source">
452
+ onclick="toggleCode('M000215-source');return false;">[Source]</a></p>
453
+ <div class="method-source-code" id="M000215-source">
452
454
  <pre>
453
- <span class="ruby-comment cmt"># File kwartz/binding/rails.rb, line 186</span>
455
+ <span class="ruby-comment cmt"># File kwartz/binding/rails.rb, line 188</span>
454
456
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">add_directive_object_and_method</span>(<span class="ruby-identifier">d_arg</span>, <span class="ruby-identifier">attr_info</span>)
455
457
  <span class="ruby-keyword kw">if</span> (<span class="ruby-regexp re">/\A(\w+)\[(\w+)\]\z/</span> <span class="ruby-operator">=~</span> <span class="ruby-identifier">attr_info</span>[<span class="ruby-value str">'name'</span>]) <span class="ruby-operator">||</span> (<span class="ruby-regexp re">/\A([a-zA-A0-9]+)_(\w+)\z/</span> <span class="ruby-operator">=~</span> <span class="ruby-identifier">attr_info</span>[<span class="ruby-value str">'id'</span>])
456
458
  <span class="ruby-identifier">object</span> = <span class="ruby-identifier">$1</span> ; <span class="ruby-identifier">method</span> = <span class="ruby-identifier">$2</span>
@@ -462,21 +464,21 @@ everytime return true whenever directive name is unknown.
462
464
  </div>
463
465
  </div>
464
466
 
465
- <div id="method-M000164" class="method-detail">
466
- <a name="M000164"></a>
467
+ <div id="method-M000216" class="method-detail">
468
+ <a name="M000216"></a>
467
469
 
468
470
  <div class="method-heading">
469
- <a href="#M000164" class="method-signature">
471
+ <a href="#M000216" class="method-signature">
470
472
  <span class="method-name">add_directive_object_and_method_and_value</span><span class="method-args">(d_arg, attr_info)</span>
471
473
  </a>
472
474
  </div>
473
475
 
474
476
  <div class="method-description">
475
477
  <p><a class="source-toggle" href="#"
476
- onclick="toggleCode('M000164-source');return false;">[Source]</a></p>
477
- <div class="method-source-code" id="M000164-source">
478
+ onclick="toggleCode('M000216-source');return false;">[Source]</a></p>
479
+ <div class="method-source-code" id="M000216-source">
478
480
  <pre>
479
- <span class="ruby-comment cmt"># File kwartz/binding/rails.rb, line 194</span>
481
+ <span class="ruby-comment cmt"># File kwartz/binding/rails.rb, line 196</span>
480
482
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">add_directive_object_and_method_and_value</span>(<span class="ruby-identifier">d_arg</span>, <span class="ruby-identifier">attr_info</span>)
481
483
  <span class="ruby-identifier">object</span> = <span class="ruby-identifier">method</span> = <span class="ruby-value str">''</span>
482
484
  <span class="ruby-keyword kw">if</span> (<span class="ruby-regexp re">/\A(\w+)\[(\w+)\]\z/</span> <span class="ruby-operator">=~</span> <span class="ruby-identifier">attr_info</span>[<span class="ruby-value str">'name'</span>]) <span class="ruby-operator">||</span> (<span class="ruby-regexp re">/\A([a-zA-z0-9]+)_(\w+?)_[a-zA-z0-9]+\z/</span> <span class="ruby-operator">=~</span> <span class="ruby-identifier">attr_info</span>[<span class="ruby-value str">'id'</span>])
@@ -490,21 +492,21 @@ everytime return true whenever directive name is unknown.
490
492
  </div>
491
493
  </div>
492
494
 
493
- <div id="method-M000170" class="method-detail">
494
- <a name="M000170"></a>
495
+ <div id="method-M000222" class="method-detail">
496
+ <a name="M000222"></a>
495
497
 
496
498
  <div class="method-heading">
497
- <a href="#M000170" class="method-signature">
499
+ <a href="#M000222" class="method-signature">
498
500
  <span class="method-name">add_directive_str_option</span><span class="method-args">(directive_arg, attr_name, attr_value)</span>
499
501
  </a>
500
502
  </div>
501
503
 
502
504
  <div class="method-description">
503
505
  <p><a class="source-toggle" href="#"
504
- onclick="toggleCode('M000170-source');return false;">[Source]</a></p>
505
- <div class="method-source-code" id="M000170-source">
506
+ onclick="toggleCode('M000222-source');return false;">[Source]</a></p>
507
+ <div class="method-source-code" id="M000222-source">
506
508
  <pre>
507
- <span class="ruby-comment cmt"># File kwartz/binding/rails.rb, line 244</span>
509
+ <span class="ruby-comment cmt"># File kwartz/binding/rails.rb, line 246</span>
508
510
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">add_directive_str_option</span>(<span class="ruby-identifier">directive_arg</span>, <span class="ruby-identifier">attr_name</span>, <span class="ruby-identifier">attr_value</span>)
509
511
  <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">attr_value</span>
510
512
  <span class="ruby-identifier">directive_arg</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-value str">', '</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">directive_arg</span>.<span class="ruby-identifier">empty?</span>
@@ -516,32 +518,33 @@ everytime return true whenever directive name is unknown.
516
518
  </div>
517
519
  </div>
518
520
 
519
- <div id="method-M000171" class="method-detail">
520
- <a name="M000171"></a>
521
+ <div id="method-M000223" class="method-detail">
522
+ <a name="M000223"></a>
521
523
 
522
524
  <div class="method-heading">
523
- <a href="#M000171" class="method-signature">
524
- <span class="method-name">print_directive</span><span class="method-args">(d_name, d_arg, stag_info, etag_info, cont_stmts, attr_info, stmt_list, replace_elem=true)</span>
525
+ <a href="#M000223" class="method-signature">
526
+ <span class="method-name">print_directive</span><span class="method-args">(stmt_list, handler_arg, replace_elem=true)</span>
525
527
  </a>
526
528
  </div>
527
529
 
528
530
  <div class="method-description">
529
531
  <p><a class="source-toggle" href="#"
530
- onclick="toggleCode('M000171-source');return false;">[Source]</a></p>
531
- <div class="method-source-code" id="M000171-source">
532
+ onclick="toggleCode('M000223-source');return false;">[Source]</a></p>
533
+ <div class="method-source-code" id="M000223-source">
532
534
  <pre>
533
- <span class="ruby-comment cmt"># File kwartz/binding/rails.rb, line 252</span>
534
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">print_directive</span>(<span class="ruby-identifier">d_name</span>, <span class="ruby-identifier">d_arg</span>, <span class="ruby-identifier">stag_info</span>, <span class="ruby-identifier">etag_info</span>, <span class="ruby-identifier">cont_stmts</span>, <span class="ruby-identifier">attr_info</span>, <span class="ruby-identifier">stmt_list</span>, <span class="ruby-identifier">replace_elem</span>=<span class="ruby-keyword kw">true</span>)
535
- <span class="ruby-identifier">head_space</span> = <span class="ruby-identifier">stag_info</span>.<span class="ruby-identifier">head_space</span>
536
- <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>
537
- <span class="ruby-identifier">args</span> = []
538
- <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>
539
- <span class="ruby-identifier">args</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-constant">NativeExpression</span>.<span class="ruby-identifier">new</span>(<span class="ruby-node">&quot;#{d_name} #{d_arg}&quot;</span>)
540
- <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>
541
- <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-identifier">args</span>)
535
+ <span class="ruby-comment cmt"># File kwartz/binding/rails.rb, line 254</span>
536
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">print_directive</span>(<span class="ruby-identifier">stmt_list</span>, <span class="ruby-identifier">handler_arg</span>, <span class="ruby-identifier">replace_elem</span>=<span class="ruby-keyword kw">true</span>)
537
+ <span class="ruby-identifier">arg</span> = <span class="ruby-identifier">handler_arg</span>
538
+ <span class="ruby-identifier">head_space</span> = <span class="ruby-identifier">arg</span>.<span class="ruby-identifier">stag_info</span>.<span class="ruby-identifier">head_space</span>
539
+ <span class="ruby-identifier">tail_space</span> = (<span class="ruby-identifier">arg</span>.<span class="ruby-identifier">etag_info</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">arg</span>.<span class="ruby-identifier">stag_info</span>).<span class="ruby-identifier">tail_space</span>
540
+ <span class="ruby-identifier">pargs</span> = []
541
+ <span class="ruby-identifier">pargs</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>
542
+ <span class="ruby-identifier">pargs</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-constant">NativeExpression</span>.<span class="ruby-identifier">new</span>(<span class="ruby-node">&quot;#{arg.directive_name} #{arg.directive_arg}&quot;</span>)
543
+ <span class="ruby-identifier">pargs</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>
544
+ <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-identifier">pargs</span>)
542
545
  <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">replace_elem</span>
543
- <span class="ruby-identifier">stmt_list</span>.<span class="ruby-identifier">concat</span>(<span class="ruby-identifier">cont_stmts</span>)
544
- <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-identifier">etag_info</span>.<span class="ruby-identifier">tag_text</span>])
546
+ <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>)
547
+ <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-identifier">arg</span>.<span class="ruby-identifier">etag_info</span>.<span class="ruby-identifier">tag_text</span>])
545
548
  <span class="ruby-keyword kw">end</span>
546
549
  <span class="ruby-keyword kw">end</span>
547
550
  </pre>
@@ -549,21 +552,21 @@ everytime return true whenever directive name is unknown.
549
552
  </div>
550
553
  </div>
551
554
 
552
- <div id="method-M000162" class="method-detail">
553
- <a name="M000162"></a>
555
+ <div id="method-M000214" class="method-detail">
556
+ <a name="M000214"></a>
554
557
 
555
558
  <div class="method-heading">
556
- <a href="#M000162" class="method-signature">
559
+ <a href="#M000214" class="method-signature">
557
560
  <span class="method-name">quote</span><span class="method-args">(str)</span>
558
561
  </a>
559
562
  </div>
560
563
 
561
564
  <div class="method-description">
562
565
  <p><a class="source-toggle" href="#"
563
- onclick="toggleCode('M000162-source');return false;">[Source]</a></p>
564
- <div class="method-source-code" id="M000162-source">
566
+ onclick="toggleCode('M000214-source');return false;">[Source]</a></p>
567
+ <div class="method-source-code" id="M000214-source">
565
568
  <pre>
566
- <span class="ruby-comment cmt"># File kwartz/binding/rails.rb, line 181</span>
569
+ <span class="ruby-comment cmt"># File kwartz/binding/rails.rb, line 183</span>
567
570
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">quote</span>(<span class="ruby-identifier">str</span>)
568
571
  <span class="ruby-keyword kw">return</span> <span class="ruby-node">&quot;'#{str.gsub(/['\\]/, '\\\\\&amp;')}'&quot;</span>
569
572
  <span class="ruby-keyword kw">end</span>