erubis 2.5.0 → 2.6.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (126) hide show
  1. data/CHANGES.txt +62 -2
  2. data/README.txt +1 -1
  3. data/benchmark/bench.rb +18 -10
  4. data/bin/erubis +1 -1
  5. data/contrib/erubis +2 -3318
  6. data/contrib/inline-require +1 -1
  7. data/doc-api/classes/ActionView.html +105 -0
  8. data/doc-api/classes/ActionView/TemplateHandlers/Erubis.html +202 -0
  9. data/doc-api/classes/Erubis.html +7 -1
  10. data/doc-api/classes/Erubis/ArrayBufferEnhancer.html +12 -12
  11. data/doc-api/classes/Erubis/ArrayEnhancer.html +12 -12
  12. data/doc-api/classes/Erubis/Basic/Converter.html +34 -30
  13. data/doc-api/classes/Erubis/BiPatternEnhancer.html +12 -12
  14. data/doc-api/classes/Erubis/CGenerator.html +60 -60
  15. data/doc-api/classes/Erubis/Context.html +42 -42
  16. data/doc-api/classes/Erubis/Converter.html +27 -27
  17. data/doc-api/classes/Erubis/DeleteIndentEnhancer.html +6 -6
  18. data/doc-api/classes/Erubis/Engine.html +40 -37
  19. data/doc-api/classes/Erubis/ErboutEnhancer.html +12 -12
  20. data/doc-api/classes/Erubis/EscapeEnhancer.html +6 -6
  21. data/doc-api/classes/Erubis/Evaluator.html +19 -19
  22. data/doc-api/classes/Erubis/Generator.html +60 -60
  23. data/doc-api/classes/Erubis/HeaderFooterEnhancer.html +12 -12
  24. data/doc-api/classes/Erubis/Helpers/RailsFormHelper.html +201 -176
  25. data/doc-api/classes/Erubis/Helpers/RailsHelper.html +58 -58
  26. data/doc-api/classes/Erubis/Helpers/RailsHelper/{PreprocessingEruby.html → TemplateConverter.html} +24 -37
  27. data/doc-api/classes/Erubis/InterpolationEnhancer.html +36 -35
  28. data/doc-api/classes/Erubis/JavaGenerator.html +54 -54
  29. data/doc-api/classes/Erubis/JavascriptGenerator.html +60 -60
  30. data/doc-api/classes/Erubis/Main.html +19 -19
  31. data/doc-api/classes/Erubis/NoCodeEnhancer.html +30 -30
  32. data/doc-api/classes/Erubis/NoTextEnhancer.html +6 -6
  33. data/doc-api/classes/Erubis/OptimizedEruby.html +6 -6
  34. data/doc-api/classes/Erubis/OptimizedGenerator.html +72 -72
  35. data/doc-api/classes/Erubis/OptimizedXmlEruby.html +6 -6
  36. data/doc-api/classes/Erubis/PI/Converter.html +21 -21
  37. data/doc-api/classes/Erubis/PI/Ec.html +6 -6
  38. data/doc-api/classes/Erubis/PI/Ejava.html +6 -6
  39. data/doc-api/classes/Erubis/PI/Ejavascript.html +6 -6
  40. data/doc-api/classes/Erubis/PI/Eperl.html +6 -6
  41. data/doc-api/classes/Erubis/PI/Ephp.html +6 -6
  42. data/doc-api/classes/Erubis/PI/Eruby.html +6 -6
  43. data/doc-api/classes/Erubis/PI/Escheme.html +6 -6
  44. data/doc-api/classes/Erubis/PI/TinyEruby.html +24 -24
  45. data/doc-api/classes/Erubis/PercentLineEnhancer.html +6 -6
  46. data/doc-api/classes/Erubis/PerlGenerator.html +54 -54
  47. data/doc-api/classes/Erubis/PhpGenerator.html +54 -54
  48. data/doc-api/classes/Erubis/PreprocessingEruby.html +183 -0
  49. data/doc-api/classes/Erubis/PreprocessingHelper.html +212 -0
  50. data/doc-api/classes/Erubis/PrintEnabledEnhancer.html +20 -20
  51. data/doc-api/classes/Erubis/PrintOutEnhancer.html +30 -30
  52. data/doc-api/classes/Erubis/RubyEvaluator.html +18 -18
  53. data/doc-api/classes/Erubis/RubyGenerator.html +48 -48
  54. data/doc-api/classes/Erubis/SchemeGenerator.html +60 -60
  55. data/doc-api/classes/Erubis/SimplifyEnhancer.html +7 -7
  56. data/doc-api/classes/Erubis/StdoutEnhancer.html +12 -12
  57. data/doc-api/classes/Erubis/StringBufferEnhancer.html +12 -12
  58. data/doc-api/classes/Erubis/TinyEruby.html +24 -24
  59. data/doc-api/classes/Erubis/XmlHelper.html +30 -30
  60. data/doc-api/created.rid +1 -1
  61. data/doc-api/files/README_txt.html +2 -2
  62. data/doc-api/files/erubis/context_rb.html +1 -1
  63. data/doc-api/files/erubis/converter_rb.html +2 -2
  64. data/doc-api/files/erubis/engine/ec_rb.html +1 -1
  65. data/doc-api/files/erubis/engine/ejava_rb.html +1 -1
  66. data/doc-api/files/erubis/engine/ejavascript_rb.html +1 -1
  67. data/doc-api/files/erubis/engine/enhanced_rb.html +1 -1
  68. data/doc-api/files/erubis/engine/eperl_rb.html +1 -1
  69. data/doc-api/files/erubis/engine/ephp_rb.html +1 -1
  70. data/doc-api/files/erubis/engine/eruby_rb.html +1 -1
  71. data/doc-api/files/erubis/engine/escheme_rb.html +1 -1
  72. data/doc-api/files/erubis/engine/optimized_rb.html +1 -1
  73. data/doc-api/files/erubis/engine_rb.html +2 -2
  74. data/doc-api/files/erubis/enhancer_rb.html +2 -2
  75. data/doc-api/files/erubis/error_rb.html +1 -1
  76. data/doc-api/files/erubis/evaluator_rb.html +1 -1
  77. data/doc-api/files/erubis/generator_rb.html +1 -1
  78. data/doc-api/files/erubis/helper_rb.html +1 -1
  79. data/doc-api/files/erubis/helpers/rails_form_helper_rb.html +2 -2
  80. data/doc-api/files/erubis/helpers/rails_helper_rb.html +3 -3
  81. data/doc-api/files/erubis/local-setting_rb.html +1 -1
  82. data/doc-api/files/erubis/main_rb.html +1 -1
  83. data/doc-api/files/erubis/preprocessing_rb.html +114 -0
  84. data/doc-api/files/erubis/tiny_rb.html +1 -1
  85. data/doc-api/files/erubis_rb.html +1 -1
  86. data/doc-api/fr_class_index.html +5 -1
  87. data/doc-api/fr_file_index.html +1 -0
  88. data/doc-api/fr_method_index.html +223 -213
  89. data/doc/users-guide.html +75 -6
  90. data/lib/erubis.rb +2 -2
  91. data/lib/erubis/context.rb +1 -1
  92. data/lib/erubis/converter.rb +11 -7
  93. data/lib/erubis/engine.rb +9 -6
  94. data/lib/erubis/engine/ec.rb +1 -1
  95. data/lib/erubis/engine/ejava.rb +1 -1
  96. data/lib/erubis/engine/ejavascript.rb +1 -1
  97. data/lib/erubis/engine/enhanced.rb +1 -1
  98. data/lib/erubis/engine/eperl.rb +1 -1
  99. data/lib/erubis/engine/ephp.rb +1 -1
  100. data/lib/erubis/engine/eruby.rb +1 -1
  101. data/lib/erubis/engine/escheme.rb +1 -1
  102. data/lib/erubis/engine/optimized.rb +1 -1
  103. data/lib/erubis/enhancer.rb +4 -3
  104. data/lib/erubis/error.rb +1 -1
  105. data/lib/erubis/evaluator.rb +1 -1
  106. data/lib/erubis/generator.rb +1 -1
  107. data/lib/erubis/helper.rb +1 -1
  108. data/lib/erubis/helpers/rails_form_helper.rb +18 -10
  109. data/lib/erubis/helpers/rails_helper.rb +100 -98
  110. data/lib/erubis/local-setting.rb +1 -1
  111. data/lib/erubis/main.rb +1 -1
  112. data/lib/erubis/preprocessing.rb +59 -0
  113. data/lib/erubis/tiny.rb +1 -1
  114. data/test/assert-text-equal.rb +1 -1
  115. data/test/data/users-guide/stderr.log +3 -0
  116. data/test/data/users-guide/tail_260.result +4 -0
  117. data/test/data/users-guide/tailnewline.rhtml +3 -0
  118. data/test/test-engines.rb +1 -1
  119. data/test/test-enhancers.rb +1 -1
  120. data/test/test-erubis.rb +44 -2
  121. data/test/test-main.rb +2 -2
  122. data/test/test-users-guide.rb +1 -1
  123. data/test/test.rb +1 -1
  124. data/test/testutil.rb +1 -1
  125. metadata +15 -5
  126. data/contrib/action_view_base_rb.patch +0 -23
@@ -111,14 +111,14 @@ if ENV[‘RAILS_ENV’] == ‘development’.
111
111
  <h3 class="section-bar">Methods</h3>
112
112
 
113
113
  <div class="name-list">
114
- <a href="#M000078">engine_class</a>&nbsp;&nbsp;
115
- <a href="#M000079">engine_class=</a>&nbsp;&nbsp;
116
- <a href="#M000080">init_properties</a>&nbsp;&nbsp;
117
- <a href="#M000081">init_properties=</a>&nbsp;&nbsp;
118
- <a href="#M000084">preprocessing</a>&nbsp;&nbsp;
119
- <a href="#M000085">preprocessing=</a>&nbsp;&nbsp;
120
- <a href="#M000082">show_src</a>&nbsp;&nbsp;
121
- <a href="#M000083">show_src=</a>&nbsp;&nbsp;
114
+ <a href="#M000085">engine_class</a>&nbsp;&nbsp;
115
+ <a href="#M000086">engine_class=</a>&nbsp;&nbsp;
116
+ <a href="#M000087">init_properties</a>&nbsp;&nbsp;
117
+ <a href="#M000088">init_properties=</a>&nbsp;&nbsp;
118
+ <a href="#M000091">preprocessing</a>&nbsp;&nbsp;
119
+ <a href="#M000092">preprocessing=</a>&nbsp;&nbsp;
120
+ <a href="#M000089">show_src</a>&nbsp;&nbsp;
121
+ <a href="#M000090">show_src=</a>&nbsp;&nbsp;
122
122
  </div>
123
123
  </div>
124
124
 
@@ -132,7 +132,7 @@ if ENV[&#8216;RAILS_ENV&#8217;] == &#8216;development&#8217;.
132
132
  <div id="class-list">
133
133
  <h3 class="section-bar">Classes and Modules</h3>
134
134
 
135
- Class <a href="RailsHelper/PreprocessingEruby.html" class="link">Erubis::Helpers::RailsHelper::PreprocessingEruby</a><br />
135
+ Module <a href="RailsHelper/TemplateConverter.html" class="link">Erubis::Helpers::RailsHelper::TemplateConverter</a><br />
136
136
 
137
137
  </div>
138
138
 
@@ -146,25 +146,25 @@ if ENV[&#8216;RAILS_ENV&#8217;] == &#8216;development&#8217;.
146
146
  <div id="methods">
147
147
  <h3 class="section-bar">Public Class methods</h3>
148
148
 
149
- <div id="method-M000078" class="method-detail">
150
- <a name="M000078"></a>
149
+ <div id="method-M000085" class="method-detail">
150
+ <a name="M000085"></a>
151
151
 
152
152
  <div class="method-heading">
153
- <a href="#M000078" class="method-signature">
153
+ <a href="#M000085" class="method-signature">
154
154
  <span class="method-name">engine_class</span><span class="method-args">()</span>
155
155
  </a>
156
156
  </div>
157
157
 
158
158
  <div class="method-description">
159
159
  <p>
160
- @@<a href="RailsHelper.html#M000078">engine_class</a> = <a
160
+ @@<a href="RailsHelper.html#M000085">engine_class</a> = ::<a
161
161
  href="../FastEruby.html">Erubis::FastEruby</a>
162
162
  </p>
163
163
  <p><a class="source-toggle" href="#"
164
- onclick="toggleCode('M000078-source');return false;">[Source]</a></p>
165
- <div class="method-source-code" id="M000078-source">
164
+ onclick="toggleCode('M000085-source');return false;">[Source]</a></p>
165
+ <div class="method-source-code" id="M000085-source">
166
166
  <pre>
167
- <span class="ruby-comment cmt"># File erubis/helpers/rails_helper.rb, line 49</span>
167
+ <span class="ruby-comment cmt"># File erubis/helpers/rails_helper.rb, line 48</span>
168
168
  <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">engine_class</span>
169
169
  <span class="ruby-ivar">@@engine_class</span>
170
170
  <span class="ruby-keyword kw">end</span>
@@ -173,21 +173,21 @@ href="../FastEruby.html">Erubis::FastEruby</a>
173
173
  </div>
174
174
  </div>
175
175
 
176
- <div id="method-M000079" class="method-detail">
177
- <a name="M000079"></a>
176
+ <div id="method-M000086" class="method-detail">
177
+ <a name="M000086"></a>
178
178
 
179
179
  <div class="method-heading">
180
- <a href="#M000079" class="method-signature">
180
+ <a href="#M000086" class="method-signature">
181
181
  <span class="method-name">engine_class=</span><span class="method-args">(klass)</span>
182
182
  </a>
183
183
  </div>
184
184
 
185
185
  <div class="method-description">
186
186
  <p><a class="source-toggle" href="#"
187
- onclick="toggleCode('M000079-source');return false;">[Source]</a></p>
188
- <div class="method-source-code" id="M000079-source">
187
+ onclick="toggleCode('M000086-source');return false;">[Source]</a></p>
188
+ <div class="method-source-code" id="M000086-source">
189
189
  <pre>
190
- <span class="ruby-comment cmt"># File erubis/helpers/rails_helper.rb, line 53</span>
190
+ <span class="ruby-comment cmt"># File erubis/helpers/rails_helper.rb, line 51</span>
191
191
  <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">engine_class=</span>(<span class="ruby-identifier">klass</span>)
192
192
  <span class="ruby-ivar">@@engine_class</span> = <span class="ruby-identifier">klass</span>
193
193
  <span class="ruby-keyword kw">end</span>
@@ -196,21 +196,21 @@ href="../FastEruby.html">Erubis::FastEruby</a>
196
196
  </div>
197
197
  </div>
198
198
 
199
- <div id="method-M000080" class="method-detail">
200
- <a name="M000080"></a>
199
+ <div id="method-M000087" class="method-detail">
200
+ <a name="M000087"></a>
201
201
 
202
202
  <div class="method-heading">
203
- <a href="#M000080" class="method-signature">
203
+ <a href="#M000087" class="method-signature">
204
204
  <span class="method-name">init_properties</span><span class="method-args">()</span>
205
205
  </a>
206
206
  </div>
207
207
 
208
208
  <div class="method-description">
209
209
  <p><a class="source-toggle" href="#"
210
- onclick="toggleCode('M000080-source');return false;">[Source]</a></p>
211
- <div class="method-source-code" id="M000080-source">
210
+ onclick="toggleCode('M000087-source');return false;">[Source]</a></p>
211
+ <div class="method-source-code" id="M000087-source">
212
212
  <pre>
213
- <span class="ruby-comment cmt"># File erubis/helpers/rails_helper.rb, line 60</span>
213
+ <span class="ruby-comment cmt"># File erubis/helpers/rails_helper.rb, line 57</span>
214
214
  <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">init_properties</span>
215
215
  <span class="ruby-ivar">@@init_properties</span>
216
216
  <span class="ruby-keyword kw">end</span>
@@ -219,21 +219,21 @@ href="../FastEruby.html">Erubis::FastEruby</a>
219
219
  </div>
220
220
  </div>
221
221
 
222
- <div id="method-M000081" class="method-detail">
223
- <a name="M000081"></a>
222
+ <div id="method-M000088" class="method-detail">
223
+ <a name="M000088"></a>
224
224
 
225
225
  <div class="method-heading">
226
- <a href="#M000081" class="method-signature">
226
+ <a href="#M000088" class="method-signature">
227
227
  <span class="method-name">init_properties=</span><span class="method-args">(hash)</span>
228
228
  </a>
229
229
  </div>
230
230
 
231
231
  <div class="method-description">
232
232
  <p><a class="source-toggle" href="#"
233
- onclick="toggleCode('M000081-source');return false;">[Source]</a></p>
234
- <div class="method-source-code" id="M000081-source">
233
+ onclick="toggleCode('M000088-source');return false;">[Source]</a></p>
234
+ <div class="method-source-code" id="M000088-source">
235
235
  <pre>
236
- <span class="ruby-comment cmt"># File erubis/helpers/rails_helper.rb, line 64</span>
236
+ <span class="ruby-comment cmt"># File erubis/helpers/rails_helper.rb, line 60</span>
237
237
  <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">init_properties=</span>(<span class="ruby-identifier">hash</span>)
238
238
  <span class="ruby-ivar">@@init_properties</span> = <span class="ruby-identifier">hash</span>
239
239
  <span class="ruby-keyword kw">end</span>
@@ -242,21 +242,21 @@ href="../FastEruby.html">Erubis::FastEruby</a>
242
242
  </div>
243
243
  </div>
244
244
 
245
- <div id="method-M000084" class="method-detail">
246
- <a name="M000084"></a>
245
+ <div id="method-M000091" class="method-detail">
246
+ <a name="M000091"></a>
247
247
 
248
248
  <div class="method-heading">
249
- <a href="#M000084" class="method-signature">
249
+ <a href="#M000091" class="method-signature">
250
250
  <span class="method-name">preprocessing</span><span class="method-args">()</span>
251
251
  </a>
252
252
  </div>
253
253
 
254
254
  <div class="method-description">
255
255
  <p><a class="source-toggle" href="#"
256
- onclick="toggleCode('M000084-source');return false;">[Source]</a></p>
257
- <div class="method-source-code" id="M000084-source">
256
+ onclick="toggleCode('M000091-source');return false;">[Source]</a></p>
257
+ <div class="method-source-code" id="M000091-source">
258
258
  <pre>
259
- <span class="ruby-comment cmt"># File erubis/helpers/rails_helper.rb, line 81</span>
259
+ <span class="ruby-comment cmt"># File erubis/helpers/rails_helper.rb, line 75</span>
260
260
  <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">preprocessing</span>
261
261
  <span class="ruby-ivar">@@preprocessing</span>
262
262
  <span class="ruby-keyword kw">end</span>
@@ -265,21 +265,21 @@ href="../FastEruby.html">Erubis::FastEruby</a>
265
265
  </div>
266
266
  </div>
267
267
 
268
- <div id="method-M000085" class="method-detail">
269
- <a name="M000085"></a>
268
+ <div id="method-M000092" class="method-detail">
269
+ <a name="M000092"></a>
270
270
 
271
271
  <div class="method-heading">
272
- <a href="#M000085" class="method-signature">
272
+ <a href="#M000092" class="method-signature">
273
273
  <span class="method-name">preprocessing=</span><span class="method-args">(flag)</span>
274
274
  </a>
275
275
  </div>
276
276
 
277
277
  <div class="method-description">
278
278
  <p><a class="source-toggle" href="#"
279
- onclick="toggleCode('M000085-source');return false;">[Source]</a></p>
280
- <div class="method-source-code" id="M000085-source">
279
+ onclick="toggleCode('M000092-source');return false;">[Source]</a></p>
280
+ <div class="method-source-code" id="M000092-source">
281
281
  <pre>
282
- <span class="ruby-comment cmt"># File erubis/helpers/rails_helper.rb, line 84</span>
282
+ <span class="ruby-comment cmt"># File erubis/helpers/rails_helper.rb, line 78</span>
283
283
  <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">preprocessing=</span>(<span class="ruby-identifier">flag</span>)
284
284
  <span class="ruby-ivar">@@preprocessing</span> = <span class="ruby-identifier">flag</span>
285
285
  <span class="ruby-keyword kw">end</span>
@@ -288,21 +288,21 @@ href="../FastEruby.html">Erubis::FastEruby</a>
288
288
  </div>
289
289
  </div>
290
290
 
291
- <div id="method-M000082" class="method-detail">
292
- <a name="M000082"></a>
291
+ <div id="method-M000089" class="method-detail">
292
+ <a name="M000089"></a>
293
293
 
294
294
  <div class="method-heading">
295
- <a href="#M000082" class="method-signature">
295
+ <a href="#M000089" class="method-signature">
296
296
  <span class="method-name">show_src</span><span class="method-args">()</span>
297
297
  </a>
298
298
  </div>
299
299
 
300
300
  <div class="method-description">
301
301
  <p><a class="source-toggle" href="#"
302
- onclick="toggleCode('M000082-source');return false;">[Source]</a></p>
303
- <div class="method-source-code" id="M000082-source">
302
+ onclick="toggleCode('M000089-source');return false;">[Source]</a></p>
303
+ <div class="method-source-code" id="M000089-source">
304
304
  <pre>
305
- <span class="ruby-comment cmt"># File erubis/helpers/rails_helper.rb, line 71</span>
305
+ <span class="ruby-comment cmt"># File erubis/helpers/rails_helper.rb, line 66</span>
306
306
  <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">show_src</span>
307
307
  <span class="ruby-ivar">@@show_src</span>
308
308
  <span class="ruby-keyword kw">end</span>
@@ -311,21 +311,21 @@ href="../FastEruby.html">Erubis::FastEruby</a>
311
311
  </div>
312
312
  </div>
313
313
 
314
- <div id="method-M000083" class="method-detail">
315
- <a name="M000083"></a>
314
+ <div id="method-M000090" class="method-detail">
315
+ <a name="M000090"></a>
316
316
 
317
317
  <div class="method-heading">
318
- <a href="#M000083" class="method-signature">
318
+ <a href="#M000090" class="method-signature">
319
319
  <span class="method-name">show_src=</span><span class="method-args">(flag)</span>
320
320
  </a>
321
321
  </div>
322
322
 
323
323
  <div class="method-description">
324
324
  <p><a class="source-toggle" href="#"
325
- onclick="toggleCode('M000083-source');return false;">[Source]</a></p>
326
- <div class="method-source-code" id="M000083-source">
325
+ onclick="toggleCode('M000090-source');return false;">[Source]</a></p>
326
+ <div class="method-source-code" id="M000090-source">
327
327
  <pre>
328
- <span class="ruby-comment cmt"># File erubis/helpers/rails_helper.rb, line 75</span>
328
+ <span class="ruby-comment cmt"># File erubis/helpers/rails_helper.rb, line 69</span>
329
329
  <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">show_src=</span>(<span class="ruby-identifier">flag</span>)
330
330
  <span class="ruby-ivar">@@show_src</span> = <span class="ruby-identifier">flag</span>
331
331
  <span class="ruby-keyword kw">end</span>
@@ -5,7 +5,7 @@
5
5
 
6
6
  <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
7
7
  <head>
8
- <title>Class: Erubis::Helpers::RailsHelper::PreprocessingEruby</title>
8
+ <title>Module: Erubis::Helpers::RailsHelper::TemplateConverter</title>
9
9
  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
10
  <meta http-equiv="Content-Script-Type" content="text/javascript" />
11
11
  <link rel="stylesheet" href="../../../.././rdoc-style.css" type="text/css" media="screen" />
@@ -49,8 +49,8 @@
49
49
  <div id="classHeader">
50
50
  <table class="header-table">
51
51
  <tr class="top-aligned-row">
52
- <td><strong>Class</strong></td>
53
- <td class="class-name-in-header">Erubis::Helpers::RailsHelper::PreprocessingEruby</td>
52
+ <td><strong>Module</strong></td>
53
+ <td class="class-name-in-header">Erubis::Helpers::RailsHelper::TemplateConverter</td>
54
54
  </tr>
55
55
  <tr class="top-aligned-row">
56
56
  <td><strong>In:</strong></td>
@@ -62,14 +62,6 @@
62
62
  </td>
63
63
  </tr>
64
64
 
65
- <tr class="top-aligned-row">
66
- <td><strong>Parent:</strong></td>
67
- <td>
68
- <a href="../../Eruby.html">
69
- Erubis::Eruby
70
- </a>
71
- </td>
72
- </tr>
73
65
  </table>
74
66
  </div>
75
67
  <!-- banner header -->
@@ -88,8 +80,8 @@
88
80
  <h3 class="section-bar">Methods</h3>
89
81
 
90
82
  <div class="name-list">
91
- <a href="#M000087">add_expr_escaped</a>&nbsp;&nbsp;
92
- <a href="#M000086">new</a>&nbsp;&nbsp;
83
+ <a href="#M000093">_create_preprocessor</a>&nbsp;&nbsp;
84
+ <a href="#M000094">_preprocessing_context_object</a>&nbsp;&nbsp;
93
85
  </div>
94
86
  </div>
95
87
 
@@ -109,53 +101,48 @@
109
101
 
110
102
  <!-- if method_list -->
111
103
  <div id="methods">
112
- <h3 class="section-bar">Public Class methods</h3>
104
+ <h3 class="section-bar">Public Instance methods</h3>
113
105
 
114
- <div id="method-M000086" class="method-detail">
115
- <a name="M000086"></a>
106
+ <div id="method-M000093" class="method-detail">
107
+ <a name="M000093"></a>
116
108
 
117
109
  <div class="method-heading">
118
- <a href="#M000086" class="method-signature">
119
- <span class="method-name">new</span><span class="method-args">(input, params={})</span>
110
+ <a href="#M000093" class="method-signature">
111
+ <span class="method-name">_create_preprocessor</span><span class="method-args">(template)</span>
120
112
  </a>
121
113
  </div>
122
114
 
123
115
  <div class="method-description">
124
116
  <p><a class="source-toggle" href="#"
125
- onclick="toggleCode('M000086-source');return false;">[Source]</a></p>
126
- <div class="method-source-code" id="M000086-source">
117
+ onclick="toggleCode('M000093-source');return false;">[Source]</a></p>
118
+ <div class="method-source-code" id="M000093-source">
127
119
  <pre>
128
- <span class="ruby-comment cmt"># File erubis/helpers/rails_helper.rb, line 88</span>
129
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">input</span>, <span class="ruby-identifier">params</span>={})
130
- <span class="ruby-identifier">params</span> = <span class="ruby-identifier">params</span>.<span class="ruby-identifier">dup</span>
131
- <span class="ruby-identifier">params</span>[<span class="ruby-identifier">:pattern</span>] = <span class="ruby-value str">'\[% %\]'</span> <span class="ruby-comment cmt"># use '[%= %]' instead of '&lt;%= %&gt;'</span>
132
- <span class="ruby-identifier">params</span>[<span class="ruby-identifier">:escape</span>] = <span class="ruby-keyword kw">true</span> <span class="ruby-comment cmt"># transport '[%= %]' and '[%== %]'</span>
133
- <span class="ruby-keyword kw">super</span>
120
+ <span class="ruby-comment cmt"># File erubis/helpers/rails_helper.rb, line 108</span>
121
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">_create_preprocessor</span>(<span class="ruby-identifier">template</span>)
122
+ <span class="ruby-keyword kw">return</span> <span class="ruby-constant">PreprocessingEruby</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">template</span>, <span class="ruby-identifier">:escape=</span><span class="ruby-operator">&gt;</span><span class="ruby-keyword kw">true</span>)
134
123
  <span class="ruby-keyword kw">end</span>
135
124
  </pre>
136
125
  </div>
137
126
  </div>
138
127
  </div>
139
128
 
140
- <h3 class="section-bar">Public Instance methods</h3>
141
-
142
- <div id="method-M000087" class="method-detail">
143
- <a name="M000087"></a>
129
+ <div id="method-M000094" class="method-detail">
130
+ <a name="M000094"></a>
144
131
 
145
132
  <div class="method-heading">
146
- <a href="#M000087" class="method-signature">
147
- <span class="method-name">add_expr_escaped</span><span class="method-args">(src, code)</span>
133
+ <a href="#M000094" class="method-signature">
134
+ <span class="method-name">_preprocessing_context_object</span><span class="method-args">()</span>
148
135
  </a>
149
136
  </div>
150
137
 
151
138
  <div class="method-description">
152
139
  <p><a class="source-toggle" href="#"
153
- onclick="toggleCode('M000087-source');return false;">[Source]</a></p>
154
- <div class="method-source-code" id="M000087-source">
140
+ onclick="toggleCode('M000094-source');return false;">[Source]</a></p>
141
+ <div class="method-source-code" id="M000094-source">
155
142
  <pre>
156
- <span class="ruby-comment cmt"># File erubis/helpers/rails_helper.rb, line 94</span>
157
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">add_expr_escaped</span>(<span class="ruby-identifier">src</span>, <span class="ruby-identifier">code</span>)
158
- <span class="ruby-identifier">add_expr_literal</span>(<span class="ruby-identifier">src</span>, <span class="ruby-node">&quot;_decode((#{code}))&quot;</span>)
143
+ <span class="ruby-comment cmt"># File erubis/helpers/rails_helper.rb, line 111</span>
144
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">_preprocessing_context_object</span>
145
+ <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">self</span>
159
146
  <span class="ruby-keyword kw">end</span>
160
147
  </pre>
161
148
  </div>
@@ -90,11 +90,11 @@ this is only for <a href="Eruby.html">Eruby</a>.
90
90
  <h3 class="section-bar">Methods</h3>
91
91
 
92
92
  <div class="name-list">
93
- <a href="#M000020">_add_text_to_str</a>&nbsp;&nbsp;
94
- <a href="#M000021">add_expr_escaped</a>&nbsp;&nbsp;
95
- <a href="#M000022">add_expr_literal</a>&nbsp;&nbsp;
96
- <a href="#M000019">add_text</a>&nbsp;&nbsp;
97
- <a href="#M000018">convert_input</a>&nbsp;&nbsp;
93
+ <a href="#M000023">_add_text_to_str</a>&nbsp;&nbsp;
94
+ <a href="#M000024">add_expr_escaped</a>&nbsp;&nbsp;
95
+ <a href="#M000025">add_expr_literal</a>&nbsp;&nbsp;
96
+ <a href="#M000022">add_text</a>&nbsp;&nbsp;
97
+ <a href="#M000021">convert_input</a>&nbsp;&nbsp;
98
98
  </div>
99
99
  </div>
100
100
 
@@ -116,21 +116,21 @@ this is only for <a href="Eruby.html">Eruby</a>.
116
116
  <div id="methods">
117
117
  <h3 class="section-bar">Public Instance methods</h3>
118
118
 
119
- <div id="method-M000020" class="method-detail">
120
- <a name="M000020"></a>
119
+ <div id="method-M000023" class="method-detail">
120
+ <a name="M000023"></a>
121
121
 
122
122
  <div class="method-heading">
123
- <a href="#M000020" class="method-signature">
123
+ <a href="#M000023" class="method-signature">
124
124
  <span class="method-name">_add_text_to_str</span><span class="method-args">(str, text)</span>
125
125
  </a>
126
126
  </div>
127
127
 
128
128
  <div class="method-description">
129
129
  <p><a class="source-toggle" href="#"
130
- onclick="toggleCode('M000020-source');return false;">[Source]</a></p>
131
- <div class="method-source-code" id="M000020-source">
130
+ onclick="toggleCode('M000023-source');return false;">[Source]</a></p>
131
+ <div class="method-source-code" id="M000023-source">
132
132
  <pre>
133
- <span class="ruby-comment cmt"># File erubis/enhancer.rb, line 654</span>
133
+ <span class="ruby-comment cmt"># File erubis/enhancer.rb, line 655</span>
134
134
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">_add_text_to_str</span>(<span class="ruby-identifier">str</span>, <span class="ruby-identifier">text</span>)
135
135
  <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">if</span> <span class="ruby-operator">!</span><span class="ruby-identifier">text</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">text</span>.<span class="ruby-identifier">empty?</span>
136
136
  <span class="ruby-identifier">text</span>.<span class="ruby-identifier">gsub!</span>(<span class="ruby-regexp re">/['\#\\]/</span>, <span class="ruby-value str">'\\\\\&amp;'</span>)
@@ -141,21 +141,21 @@ this is only for <a href="Eruby.html">Eruby</a>.
141
141
  </div>
142
142
  </div>
143
143
 
144
- <div id="method-M000021" class="method-detail">
145
- <a name="M000021"></a>
144
+ <div id="method-M000024" class="method-detail">
145
+ <a name="M000024"></a>
146
146
 
147
147
  <div class="method-heading">
148
- <a href="#M000021" class="method-signature">
148
+ <a href="#M000024" class="method-signature">
149
149
  <span class="method-name">add_expr_escaped</span><span class="method-args">(str, code)</span>
150
150
  </a>
151
151
  </div>
152
152
 
153
153
  <div class="method-description">
154
154
  <p><a class="source-toggle" href="#"
155
- onclick="toggleCode('M000021-source');return false;">[Source]</a></p>
156
- <div class="method-source-code" id="M000021-source">
155
+ onclick="toggleCode('M000024-source');return false;">[Source]</a></p>
156
+ <div class="method-source-code" id="M000024-source">
157
157
  <pre>
158
- <span class="ruby-comment cmt"># File erubis/enhancer.rb, line 660</span>
158
+ <span class="ruby-comment cmt"># File erubis/enhancer.rb, line 661</span>
159
159
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">add_expr_escaped</span>(<span class="ruby-identifier">str</span>, <span class="ruby-identifier">code</span>)
160
160
  <span class="ruby-identifier">str</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-node">&quot;\#{#{escaped_expr(code)}}&quot;</span>
161
161
  <span class="ruby-keyword kw">end</span>
@@ -164,21 +164,21 @@ this is only for <a href="Eruby.html">Eruby</a>.
164
164
  </div>
165
165
  </div>
166
166
 
167
- <div id="method-M000022" class="method-detail">
168
- <a name="M000022"></a>
167
+ <div id="method-M000025" class="method-detail">
168
+ <a name="M000025"></a>
169
169
 
170
170
  <div class="method-heading">
171
- <a href="#M000022" class="method-signature">
171
+ <a href="#M000025" class="method-signature">
172
172
  <span class="method-name">add_expr_literal</span><span class="method-args">(str, code)</span>
173
173
  </a>
174
174
  </div>
175
175
 
176
176
  <div class="method-description">
177
177
  <p><a class="source-toggle" href="#"
178
- onclick="toggleCode('M000022-source');return false;">[Source]</a></p>
179
- <div class="method-source-code" id="M000022-source">
178
+ onclick="toggleCode('M000025-source');return false;">[Source]</a></p>
179
+ <div class="method-source-code" id="M000025-source">
180
180
  <pre>
181
- <span class="ruby-comment cmt"># File erubis/enhancer.rb, line 664</span>
181
+ <span class="ruby-comment cmt"># File erubis/enhancer.rb, line 665</span>
182
182
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">add_expr_literal</span>(<span class="ruby-identifier">str</span>, <span class="ruby-identifier">code</span>)
183
183
  <span class="ruby-identifier">str</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-node">&quot;\#{#{code}}&quot;</span>
184
184
  <span class="ruby-keyword kw">end</span>
@@ -187,21 +187,21 @@ this is only for <a href="Eruby.html">Eruby</a>.
187
187
  </div>
188
188
  </div>
189
189
 
190
- <div id="method-M000019" class="method-detail">
191
- <a name="M000019"></a>
190
+ <div id="method-M000022" class="method-detail">
191
+ <a name="M000022"></a>
192
192
 
193
193
  <div class="method-heading">
194
- <a href="#M000019" class="method-signature">
194
+ <a href="#M000022" class="method-signature">
195
195
  <span class="method-name">add_text</span><span class="method-args">(src, text)</span>
196
196
  </a>
197
197
  </div>
198
198
 
199
199
  <div class="method-description">
200
200
  <p><a class="source-toggle" href="#"
201
- onclick="toggleCode('M000019-source');return false;">[Source]</a></p>
202
- <div class="method-source-code" id="M000019-source">
201
+ onclick="toggleCode('M000022-source');return false;">[Source]</a></p>
202
+ <div class="method-source-code" id="M000022-source">
203
203
  <pre>
204
- <span class="ruby-comment cmt"># File erubis/enhancer.rb, line 643</span>
204
+ <span class="ruby-comment cmt"># File erubis/enhancer.rb, line 644</span>
205
205
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">add_text</span>(<span class="ruby-identifier">src</span>, <span class="ruby-identifier">text</span>)
206
206
  <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">if</span> <span class="ruby-operator">!</span><span class="ruby-identifier">text</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">text</span>.<span class="ruby-identifier">empty?</span>
207
207
  <span class="ruby-comment cmt">#src &lt;&lt; &quot; _buf &lt;&lt; %Q`&quot; &lt;&lt; text &lt;&lt; &quot;`;&quot;</span>
@@ -217,19 +217,19 @@ this is only for <a href="Eruby.html">Eruby</a>.
217
217
  </div>
218
218
  </div>
219
219
 
220
- <div id="method-M000018" class="method-detail">
221
- <a name="M000018"></a>
220
+ <div id="method-M000021" class="method-detail">
221
+ <a name="M000021"></a>
222
222
 
223
223
  <div class="method-heading">
224
- <a href="#M000018" class="method-signature">
224
+ <a href="#M000021" class="method-signature">
225
225
  <span class="method-name">convert_input</span><span class="method-args">(src, input)</span>
226
226
  </a>
227
227
  </div>
228
228
 
229
229
  <div class="method-description">
230
230
  <p><a class="source-toggle" href="#"
231
- onclick="toggleCode('M000018-source');return false;">[Source]</a></p>
232
- <div class="method-source-code" id="M000018-source">
231
+ onclick="toggleCode('M000021-source');return false;">[Source]</a></p>
232
+ <div class="method-source-code" id="M000021-source">
233
233
  <pre>
234
234
  <span class="ruby-comment cmt"># File erubis/enhancer.rb, line 590</span>
235
235
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">convert_input</span>(<span class="ruby-identifier">src</span>, <span class="ruby-identifier">input</span>)
@@ -238,7 +238,7 @@ this is only for <a href="Eruby.html">Eruby</a>.
238
238
  <span class="ruby-identifier">pos</span> = <span class="ruby-value">0</span>
239
239
  <span class="ruby-identifier">is_bol</span> = <span class="ruby-keyword kw">true</span> <span class="ruby-comment cmt"># is beginning of line</span>
240
240
  <span class="ruby-identifier">str</span> = <span class="ruby-value str">''</span>
241
- <span class="ruby-identifier">input</span>.<span class="ruby-identifier">scan</span>(<span class="ruby-identifier">regexp</span>) <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">indicator</span>, <span class="ruby-identifier">code</span>, <span class="ruby-identifier">rspace</span><span class="ruby-operator">|</span>
241
+ <span class="ruby-identifier">input</span>.<span class="ruby-identifier">scan</span>(<span class="ruby-identifier">regexp</span>) <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">indicator</span>, <span class="ruby-identifier">code</span>, <span class="ruby-identifier">tailch</span>, <span class="ruby-identifier">rspace</span><span class="ruby-operator">|</span>
242
242
  <span class="ruby-identifier">match</span> = <span class="ruby-constant">Regexp</span>.<span class="ruby-identifier">last_match</span>()
243
243
  <span class="ruby-identifier">len</span> = <span class="ruby-identifier">match</span>.<span class="ruby-identifier">begin</span>(<span class="ruby-value">0</span>) <span class="ruby-operator">-</span> <span class="ruby-identifier">pos</span>
244
244
  <span class="ruby-identifier">text</span> = <span class="ruby-identifier">input</span>[<span class="ruby-identifier">pos</span>, <span class="ruby-identifier">len</span>]
@@ -250,6 +250,7 @@ this is only for <a href="Eruby.html">Eruby</a>.
250
250
  <span class="ruby-comment cmt">## * when '&lt;%= %&gt;', do nothing</span>
251
251
  <span class="ruby-comment cmt">## * when '&lt;% %&gt;' or '&lt;%# %&gt;', delete spaces iff only spaces are around '&lt;% %&gt;'</span>
252
252
  <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">ch</span> <span class="ruby-operator">==</span> <span class="ruby-value">?=</span> <span class="ruby-comment cmt"># &lt;%= %&gt;</span>
253
+ <span class="ruby-identifier">rspace</span> = <span class="ruby-keyword kw">nil</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">tailch</span> <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-operator">!</span><span class="ruby-identifier">tailch</span>.<span class="ruby-identifier">empty?</span>
253
254
  <span class="ruby-identifier">str</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">lspace</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">lspace</span>
254
255
  <span class="ruby-identifier">add_expr</span>(<span class="ruby-identifier">str</span>, <span class="ruby-identifier">code</span>, <span class="ruby-identifier">indicator</span>)
255
256
  <span class="ruby-identifier">str</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">rspace</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">rspace</span>