erubis 2.3.1 → 2.4.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (97) hide show
  1. data/CHANGES +69 -2
  2. data/README.txt +1 -1
  3. data/benchmark/bench.rb +1 -1
  4. data/bin/erubis +1 -1
  5. data/contrib/erubis +3295 -2
  6. data/contrib/inline-require +1 -1
  7. data/doc-api/classes/Erubis.html +1 -1
  8. data/doc-api/classes/Erubis/ArrayEnhancer.html +12 -12
  9. data/doc-api/classes/Erubis/Basic/Converter.html +4 -4
  10. data/doc-api/classes/Erubis/BiPatternEnhancer.html +12 -12
  11. data/doc-api/classes/Erubis/CGenerator.html +60 -60
  12. data/doc-api/classes/Erubis/Context.html +42 -42
  13. data/doc-api/classes/Erubis/Converter.html +3 -2
  14. data/doc-api/classes/Erubis/DeleteIndentEnhancer.html +6 -6
  15. data/doc-api/classes/Erubis/Engine.html +30 -30
  16. data/doc-api/classes/Erubis/ErboutEnhancer.html +12 -12
  17. data/doc-api/classes/Erubis/EscapeEnhancer.html +6 -6
  18. data/doc-api/classes/Erubis/HeaderFooterEnhancer.html +12 -12
  19. data/doc-api/classes/Erubis/Helpers/RailsHelper.html +62 -7
  20. data/doc-api/classes/Erubis/Helpers/RailsHelper/PreprocessingEruby.html +177 -0
  21. data/doc-api/classes/Erubis/JavaGenerator.html +54 -54
  22. data/doc-api/classes/Erubis/JavascriptGenerator.html +60 -60
  23. data/doc-api/classes/Erubis/Main.html +20 -20
  24. data/doc-api/classes/Erubis/NoTextEnhancer.html +6 -6
  25. data/doc-api/classes/Erubis/OptimizedEruby.html +6 -6
  26. data/doc-api/classes/Erubis/OptimizedGenerator.html +72 -72
  27. data/doc-api/classes/Erubis/OptimizedXmlEruby.html +6 -6
  28. data/doc-api/classes/Erubis/PI/Converter.html +3 -3
  29. data/doc-api/classes/Erubis/PercentLineEnhancer.html +6 -6
  30. data/doc-api/classes/Erubis/PhpGenerator.html +54 -54
  31. data/doc-api/classes/Erubis/PrintEnabledEnhancer.html +20 -20
  32. data/doc-api/classes/Erubis/PrintOutEnhancer.html +30 -30
  33. data/doc-api/classes/Erubis/RubyEvaluator.html +47 -15
  34. data/doc-api/classes/Erubis/StringBufferEnhancer.html +12 -12
  35. data/doc-api/classes/Erubis/TinyEruby.html +24 -24
  36. data/doc-api/classes/Erubis/XmlHelper.html +79 -14
  37. data/doc-api/created.rid +1 -1
  38. data/doc-api/files/README_txt.html +2 -2
  39. data/doc-api/files/erubis/context_rb.html +1 -1
  40. data/doc-api/files/erubis/converter_rb.html +2 -2
  41. data/doc-api/files/erubis/engine/ec_rb.html +1 -1
  42. data/doc-api/files/erubis/engine/ejava_rb.html +1 -1
  43. data/doc-api/files/erubis/engine/ejavascript_rb.html +1 -1
  44. data/doc-api/files/erubis/engine/enhanced_rb.html +1 -1
  45. data/doc-api/files/erubis/engine/eperl_rb.html +1 -1
  46. data/doc-api/files/erubis/engine/ephp_rb.html +1 -1
  47. data/doc-api/files/erubis/engine/eruby_rb.html +1 -1
  48. data/doc-api/files/erubis/engine/escheme_rb.html +1 -1
  49. data/doc-api/files/erubis/engine/optimized_rb.html +1 -1
  50. data/doc-api/files/erubis/engine_rb.html +1 -1
  51. data/doc-api/files/erubis/enhancer_rb.html +1 -1
  52. data/doc-api/files/erubis/error_rb.html +1 -1
  53. data/doc-api/files/erubis/evaluator_rb.html +2 -2
  54. data/doc-api/files/erubis/generator_rb.html +1 -1
  55. data/doc-api/files/erubis/helper_rb.html +2 -2
  56. data/doc-api/files/erubis/helpers/rails_helper_rb.html +3 -2
  57. data/doc-api/files/erubis/local-setting_rb.html +1 -1
  58. data/doc-api/files/erubis/main_rb.html +2 -2
  59. data/doc-api/files/erubis/tiny_rb.html +1 -1
  60. data/doc-api/files/erubis_rb.html +1 -1
  61. data/doc-api/fr_class_index.html +1 -0
  62. data/doc-api/fr_method_index.html +128 -120
  63. data/doc/users-guide.html +248 -88
  64. data/lib/erubis.rb +2 -2
  65. data/lib/erubis/context.rb +1 -1
  66. data/lib/erubis/converter.rb +3 -2
  67. data/lib/erubis/engine.rb +1 -1
  68. data/lib/erubis/engine/ec.rb +1 -1
  69. data/lib/erubis/engine/ejava.rb +1 -1
  70. data/lib/erubis/engine/ejavascript.rb +1 -1
  71. data/lib/erubis/engine/enhanced.rb +1 -1
  72. data/lib/erubis/engine/eperl.rb +1 -1
  73. data/lib/erubis/engine/ephp.rb +1 -1
  74. data/lib/erubis/engine/eruby.rb +1 -1
  75. data/lib/erubis/engine/escheme.rb +1 -1
  76. data/lib/erubis/engine/optimized.rb +1 -1
  77. data/lib/erubis/enhancer.rb +1 -1
  78. data/lib/erubis/error.rb +1 -1
  79. data/lib/erubis/evaluator.rb +15 -4
  80. data/lib/erubis/generator.rb +1 -1
  81. data/lib/erubis/helper.rb +14 -2
  82. data/lib/erubis/helpers/rails_helper.rb +48 -3
  83. data/lib/erubis/local-setting.rb +1 -1
  84. data/lib/erubis/main.rb +7 -8
  85. data/lib/erubis/tiny.rb +1 -1
  86. data/test/assert-text-equal.rb +1 -1
  87. data/test/data/users-guide/def_method.rb +14 -0
  88. data/test/data/users-guide/def_method.result +3 -0
  89. data/test/test-engines.rb +1 -1
  90. data/test/test-enhancers.rb +1 -1
  91. data/test/test-erubis.rb +40 -2
  92. data/test/test-main.rb +17 -4
  93. data/test/test-users-guide.rb +1 -1
  94. data/test/test.rb +1 -1
  95. data/test/testutil.rb +1 -1
  96. metadata +15 -11
  97. data/test/data/users-guide/stderr.log +0 -3
@@ -158,6 +158,7 @@ language
158
158
  <span class="ruby-ivar">@preamble</span>.<span class="ruby-identifier">nil?</span> <span class="ruby-value">? </span><span class="ruby-identifier">add_preamble</span>(<span class="ruby-identifier">codebuf</span>) <span class="ruby-operator">:</span> (<span class="ruby-ivar">@preamble</span> <span class="ruby-operator">&amp;&amp;</span> (<span class="ruby-identifier">codebuf</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-ivar">@preamble</span>))
159
159
  <span class="ruby-identifier">convert_input</span>(<span class="ruby-identifier">codebuf</span>, <span class="ruby-identifier">input</span>)
160
160
  <span class="ruby-ivar">@postamble</span>.<span class="ruby-identifier">nil?</span> <span class="ruby-value">? </span><span class="ruby-identifier">add_postamble</span>(<span class="ruby-identifier">codebuf</span>) <span class="ruby-operator">:</span> (<span class="ruby-ivar">@postamble</span> <span class="ruby-operator">&amp;&amp;</span> (<span class="ruby-identifier">codebuf</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-ivar">@postamble</span>))
161
+ <span class="ruby-ivar">@_proc</span> = <span class="ruby-keyword kw">nil</span> <span class="ruby-comment cmt"># clear cached proc object</span>
161
162
  <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">codebuf</span> <span class="ruby-comment cmt"># or codebuf.join()</span>
162
163
  <span class="ruby-keyword kw">end</span>
163
164
  </pre>
@@ -209,7 +210,7 @@ language
209
210
  onclick="toggleCode('M000077-source');return false;">[Source]</a></p>
210
211
  <div class="method-source-code" id="M000077-source">
211
212
  <pre>
212
- <span class="ruby-comment cmt"># File erubis/converter.rb, line 77</span>
213
+ <span class="ruby-comment cmt"># File erubis/converter.rb, line 78</span>
213
214
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">convert_input</span>(<span class="ruby-identifier">codebuf</span>, <span class="ruby-identifier">input</span>)
214
215
  <span class="ruby-identifier">not_implemented</span>
215
216
  <span class="ruby-keyword kw">end</span>
@@ -235,7 +236,7 @@ detect spaces at beginning of line
235
236
  onclick="toggleCode('M000076-source');return false;">[Source]</a></p>
236
237
  <div class="method-source-code" id="M000076-source">
237
238
  <pre>
238
- <span class="ruby-comment cmt"># File erubis/converter.rb, line 47</span>
239
+ <span class="ruby-comment cmt"># File erubis/converter.rb, line 48</span>
239
240
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">detect_spaces_at_bol</span>(<span class="ruby-identifier">text</span>, <span class="ruby-identifier">is_bol</span>)
240
241
  <span class="ruby-identifier">lspace</span> = <span class="ruby-keyword kw">nil</span>
241
242
  <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">text</span>.<span class="ruby-identifier">empty?</span>
@@ -89,7 +89,7 @@ this is language-independent.
89
89
  <h3 class="section-bar">Methods</h3>
90
90
 
91
91
  <div class="name-list">
92
- <a href="#M000156">convert_input</a>&nbsp;&nbsp;
92
+ <a href="#M000163">convert_input</a>&nbsp;&nbsp;
93
93
  </div>
94
94
  </div>
95
95
 
@@ -111,19 +111,19 @@ this is language-independent.
111
111
  <div id="methods">
112
112
  <h3 class="section-bar">Public Instance methods</h3>
113
113
 
114
- <div id="method-M000156" class="method-detail">
115
- <a name="M000156"></a>
114
+ <div id="method-M000163" class="method-detail">
115
+ <a name="M000163"></a>
116
116
 
117
117
  <div class="method-heading">
118
- <a href="#M000156" class="method-signature">
118
+ <a href="#M000163" class="method-signature">
119
119
  <span class="method-name">convert_input</span><span class="method-args">(src, input)</span>
120
120
  </a>
121
121
  </div>
122
122
 
123
123
  <div class="method-description">
124
124
  <p><a class="source-toggle" href="#"
125
- onclick="toggleCode('M000156-source');return false;">[Source]</a></p>
126
- <div class="method-source-code" id="M000156-source">
125
+ onclick="toggleCode('M000163-source');return false;">[Source]</a></p>
126
+ <div class="method-source-code" id="M000163-source">
127
127
  <pre>
128
128
  <span class="ruby-comment cmt"># File erubis/enhancer.rb, line 556</span>
129
129
  <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>)
@@ -93,11 +93,11 @@ converter module.
93
93
  <h3 class="section-bar">Methods</h3>
94
94
 
95
95
  <div class="name-list">
96
- <a href="#M000166">convert!</a>&nbsp;&nbsp;
97
- <a href="#M000167">load_file</a>&nbsp;&nbsp;
98
- <a href="#M000165">new</a>&nbsp;&nbsp;
99
- <a href="#M000168">process</a>&nbsp;&nbsp;
100
- <a href="#M000169">process_proc</a>&nbsp;&nbsp;
96
+ <a href="#M000174">convert!</a>&nbsp;&nbsp;
97
+ <a href="#M000175">load_file</a>&nbsp;&nbsp;
98
+ <a href="#M000173">new</a>&nbsp;&nbsp;
99
+ <a href="#M000176">process</a>&nbsp;&nbsp;
100
+ <a href="#M000177">process_proc</a>&nbsp;&nbsp;
101
101
  </div>
102
102
  </div>
103
103
 
@@ -119,11 +119,11 @@ converter module.
119
119
  <div id="methods">
120
120
  <h3 class="section-bar">Public Class methods</h3>
121
121
 
122
- <div id="method-M000167" class="method-detail">
123
- <a name="M000167"></a>
122
+ <div id="method-M000175" class="method-detail">
123
+ <a name="M000175"></a>
124
124
 
125
125
  <div class="method-heading">
126
- <a href="#M000167" class="method-signature">
126
+ <a href="#M000175" class="method-signature">
127
127
  <span class="method-name">load_file</span><span class="method-args">(filename, properties={})</span>
128
128
  </a>
129
129
  </div>
@@ -134,8 +134,8 @@ load file, write cache file, and return engine object. this method create
134
134
  cache file (filename + &#8217;.cache&#8217;) automatically.
135
135
  </p>
136
136
  <p><a class="source-toggle" href="#"
137
- onclick="toggleCode('M000167-source');return false;">[Source]</a></p>
138
- <div class="method-source-code" id="M000167-source">
137
+ onclick="toggleCode('M000175-source');return false;">[Source]</a></p>
138
+ <div class="method-source-code" id="M000175-source">
139
139
  <pre>
140
140
  <span class="ruby-comment cmt"># File erubis/engine.rb, line 47</span>
141
141
  <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">load_file</span>(<span class="ruby-identifier">filename</span>, <span class="ruby-identifier">properties</span>={})
@@ -160,11 +160,11 @@ cache file (filename + &#8217;.cache&#8217;) automatically.
160
160
  </div>
161
161
  </div>
162
162
 
163
- <div id="method-M000165" class="method-detail">
164
- <a name="M000165"></a>
163
+ <div id="method-M000173" class="method-detail">
164
+ <a name="M000173"></a>
165
165
 
166
166
  <div class="method-heading">
167
- <a href="#M000165" class="method-signature">
167
+ <a href="#M000173" class="method-signature">
168
168
  <span class="method-name">new</span><span class="method-args">(input=nil, properties={})</span>
169
169
  </a>
170
170
  </div>
@@ -176,8 +176,8 @@ href="Converter.html">Converter</a> include <a
176
176
  href="Generator.html">Generator</a>
177
177
  </p>
178
178
  <p><a class="source-toggle" href="#"
179
- onclick="toggleCode('M000165-source');return false;">[Source]</a></p>
180
- <div class="method-source-code" id="M000165-source">
179
+ onclick="toggleCode('M000173-source');return false;">[Source]</a></p>
180
+ <div class="method-source-code" id="M000173-source">
181
181
  <pre>
182
182
  <span class="ruby-comment cmt"># File erubis/engine.rb, line 26</span>
183
183
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">input</span>=<span class="ruby-keyword kw">nil</span>, <span class="ruby-identifier">properties</span>={})
@@ -194,11 +194,11 @@ href="Generator.html">Generator</a>
194
194
 
195
195
  <h3 class="section-bar">Public Instance methods</h3>
196
196
 
197
- <div id="method-M000166" class="method-detail">
198
- <a name="M000166"></a>
197
+ <div id="method-M000174" class="method-detail">
198
+ <a name="M000174"></a>
199
199
 
200
200
  <div class="method-heading">
201
- <a href="#M000166" class="method-signature">
201
+ <a href="#M000174" class="method-signature">
202
202
  <span class="method-name">convert!</span><span class="method-args">(input)</span>
203
203
  </a>
204
204
  </div>
@@ -208,8 +208,8 @@ href="Generator.html">Generator</a>
208
208
  convert input string and set it to @src
209
209
  </p>
210
210
  <p><a class="source-toggle" href="#"
211
- onclick="toggleCode('M000166-source');return false;">[Source]</a></p>
212
- <div class="method-source-code" id="M000166-source">
211
+ onclick="toggleCode('M000174-source');return false;">[Source]</a></p>
212
+ <div class="method-source-code" id="M000174-source">
213
213
  <pre>
214
214
  <span class="ruby-comment cmt"># File erubis/engine.rb, line 38</span>
215
215
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">convert!</span>(<span class="ruby-identifier">input</span>)
@@ -220,11 +220,11 @@ convert input string and set it to @src
220
220
  </div>
221
221
  </div>
222
222
 
223
- <div id="method-M000168" class="method-detail">
224
- <a name="M000168"></a>
223
+ <div id="method-M000176" class="method-detail">
224
+ <a name="M000176"></a>
225
225
 
226
226
  <div class="method-heading">
227
- <a href="#M000168" class="method-signature">
227
+ <a href="#M000176" class="method-signature">
228
228
  <span class="method-name">process</span><span class="method-args">(input, context=nil, filename=nil)</span>
229
229
  </a>
230
230
  </div>
@@ -235,8 +235,8 @@ helper method to convert and evaluate input text with context object.
235
235
  context may be Binding, Hash, or Object.
236
236
  </p>
237
237
  <p><a class="source-toggle" href="#"
238
- onclick="toggleCode('M000168-source');return false;">[Source]</a></p>
239
- <div class="method-source-code" id="M000168-source">
238
+ onclick="toggleCode('M000176-source');return false;">[Source]</a></p>
239
+ <div class="method-source-code" id="M000176-source">
240
240
  <pre>
241
241
  <span class="ruby-comment cmt"># File erubis/engine.rb, line 70</span>
242
242
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">process</span>(<span class="ruby-identifier">input</span>, <span class="ruby-identifier">context</span>=<span class="ruby-keyword kw">nil</span>, <span class="ruby-identifier">filename</span>=<span class="ruby-keyword kw">nil</span>)
@@ -254,11 +254,11 @@ context may be Binding, Hash, or Object.
254
254
  </div>
255
255
  </div>
256
256
 
257
- <div id="method-M000169" class="method-detail">
258
- <a name="M000169"></a>
257
+ <div id="method-M000177" class="method-detail">
258
+ <a name="M000177"></a>
259
259
 
260
260
  <div class="method-heading">
261
- <a href="#M000169" class="method-signature">
261
+ <a href="#M000177" class="method-signature">
262
262
  <span class="method-name">process_proc</span><span class="method-args">(proc_obj, context=nil, filename=nil)</span>
263
263
  </a>
264
264
  </div>
@@ -269,8 +269,8 @@ helper method evaluate Proc object with contect object. context may be
269
269
  Binding, Hash, or Object.
270
270
  </p>
271
271
  <p><a class="source-toggle" href="#"
272
- onclick="toggleCode('M000169-source');return false;">[Source]</a></p>
273
- <div class="method-source-code" id="M000169-source">
272
+ onclick="toggleCode('M000177-source');return false;">[Source]</a></p>
273
+ <div class="method-source-code" id="M000177-source">
274
274
  <pre>
275
275
  <span class="ruby-comment cmt"># File erubis/engine.rb, line 86</span>
276
276
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">process_proc</span>(<span class="ruby-identifier">proc_obj</span>, <span class="ruby-identifier">context</span>=<span class="ruby-keyword kw">nil</span>, <span class="ruby-identifier">filename</span>=<span class="ruby-keyword kw">nil</span>)
@@ -90,8 +90,8 @@ 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="#M000153">add_postamble</a>&nbsp;&nbsp;
94
- <a href="#M000152">add_preamble</a>&nbsp;&nbsp;
93
+ <a href="#M000160">add_postamble</a>&nbsp;&nbsp;
94
+ <a href="#M000159">add_preamble</a>&nbsp;&nbsp;
95
95
  </div>
96
96
  </div>
97
97
 
@@ -113,19 +113,19 @@ this is only for <a href="Eruby.html">Eruby</a>.
113
113
  <div id="methods">
114
114
  <h3 class="section-bar">Public Instance methods</h3>
115
115
 
116
- <div id="method-M000153" class="method-detail">
117
- <a name="M000153"></a>
116
+ <div id="method-M000160" class="method-detail">
117
+ <a name="M000160"></a>
118
118
 
119
119
  <div class="method-heading">
120
- <a href="#M000153" class="method-signature">
120
+ <a href="#M000160" class="method-signature">
121
121
  <span class="method-name">add_postamble</span><span class="method-args">(src)</span>
122
122
  </a>
123
123
  </div>
124
124
 
125
125
  <div class="method-description">
126
126
  <p><a class="source-toggle" href="#"
127
- onclick="toggleCode('M000153-source');return false;">[Source]</a></p>
128
- <div class="method-source-code" id="M000153-source">
127
+ onclick="toggleCode('M000160-source');return false;">[Source]</a></p>
128
+ <div class="method-source-code" id="M000160-source">
129
129
  <pre>
130
130
  <span class="ruby-comment cmt"># File erubis/enhancer.rb, line 261</span>
131
131
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">add_postamble</span>(<span class="ruby-identifier">src</span>)
@@ -137,19 +137,19 @@ this is only for <a href="Eruby.html">Eruby</a>.
137
137
  </div>
138
138
  </div>
139
139
 
140
- <div id="method-M000152" class="method-detail">
141
- <a name="M000152"></a>
140
+ <div id="method-M000159" class="method-detail">
141
+ <a name="M000159"></a>
142
142
 
143
143
  <div class="method-heading">
144
- <a href="#M000152" class="method-signature">
144
+ <a href="#M000159" class="method-signature">
145
145
  <span class="method-name">add_preamble</span><span class="method-args">(src)</span>
146
146
  </a>
147
147
  </div>
148
148
 
149
149
  <div class="method-description">
150
150
  <p><a class="source-toggle" href="#"
151
- onclick="toggleCode('M000152-source');return false;">[Source]</a></p>
152
- <div class="method-source-code" id="M000152-source">
151
+ onclick="toggleCode('M000159-source');return false;">[Source]</a></p>
152
+ <div class="method-source-code" id="M000159-source">
153
153
  <pre>
154
154
  <span class="ruby-comment cmt"># File erubis/enhancer.rb, line 257</span>
155
155
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">add_preamble</span>(<span class="ruby-identifier">src</span>)
@@ -98,7 +98,7 @@ this is language-indenedent.
98
98
  <h3 class="section-bar">Methods</h3>
99
99
 
100
100
  <div class="name-list">
101
- <a href="#M000094">add_expr</a>&nbsp;&nbsp;
101
+ <a href="#M000101">add_expr</a>&nbsp;&nbsp;
102
102
  </div>
103
103
  </div>
104
104
 
@@ -120,19 +120,19 @@ this is language-indenedent.
120
120
  <div id="methods">
121
121
  <h3 class="section-bar">Public Instance methods</h3>
122
122
 
123
- <div id="method-M000094" class="method-detail">
124
- <a name="M000094"></a>
123
+ <div id="method-M000101" class="method-detail">
124
+ <a name="M000101"></a>
125
125
 
126
126
  <div class="method-heading">
127
- <a href="#M000094" class="method-signature">
127
+ <a href="#M000101" class="method-signature">
128
128
  <span class="method-name">add_expr</span><span class="method-args">(src, code, indicator)</span>
129
129
  </a>
130
130
  </div>
131
131
 
132
132
  <div class="method-description">
133
133
  <p><a class="source-toggle" href="#"
134
- onclick="toggleCode('M000094-source');return false;">[Source]</a></p>
135
- <div class="method-source-code" id="M000094-source">
134
+ onclick="toggleCode('M000101-source');return false;">[Source]</a></p>
135
+ <div class="method-source-code" id="M000101-source">
136
136
  <pre>
137
137
  <span class="ruby-comment cmt"># File erubis/enhancer.rb, line 38</span>
138
138
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">add_expr</span>(<span class="ruby-identifier">src</span>, <span class="ruby-identifier">code</span>, <span class="ruby-identifier">indicator</span>)
@@ -139,8 +139,8 @@ this is language-independent.
139
139
  <h3 class="section-bar">Methods</h3>
140
140
 
141
141
  <div class="name-list">
142
- <a href="#M000087">add_text</a>&nbsp;&nbsp;
143
- <a href="#M000088">convert</a>&nbsp;&nbsp;
142
+ <a href="#M000094">add_text</a>&nbsp;&nbsp;
143
+ <a href="#M000095">convert</a>&nbsp;&nbsp;
144
144
  </div>
145
145
  </div>
146
146
 
@@ -193,19 +193,19 @@ this is language-independent.
193
193
  <div id="methods">
194
194
  <h3 class="section-bar">Public Instance methods</h3>
195
195
 
196
- <div id="method-M000087" class="method-detail">
197
- <a name="M000087"></a>
196
+ <div id="method-M000094" class="method-detail">
197
+ <a name="M000094"></a>
198
198
 
199
199
  <div class="method-heading">
200
- <a href="#M000087" class="method-signature">
200
+ <a href="#M000094" class="method-signature">
201
201
  <span class="method-name">add_text</span><span class="method-args">(src, text)</span>
202
202
  </a>
203
203
  </div>
204
204
 
205
205
  <div class="method-description">
206
206
  <p><a class="source-toggle" href="#"
207
- onclick="toggleCode('M000087-source');return false;">[Source]</a></p>
208
- <div class="method-source-code" id="M000087-source">
207
+ onclick="toggleCode('M000094-source');return false;">[Source]</a></p>
208
+ <div class="method-source-code" id="M000094-source">
209
209
  <pre>
210
210
  <span class="ruby-comment cmt"># File erubis/enhancer.rb, line 522</span>
211
211
  <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>)
@@ -225,19 +225,19 @@ this is language-independent.
225
225
  </div>
226
226
  </div>
227
227
 
228
- <div id="method-M000088" class="method-detail">
229
- <a name="M000088"></a>
228
+ <div id="method-M000095" class="method-detail">
229
+ <a name="M000095"></a>
230
230
 
231
231
  <div class="method-heading">
232
- <a href="#M000088" class="method-signature">
232
+ <a href="#M000095" class="method-signature">
233
233
  <span class="method-name">convert</span><span class="method-args">(input)</span>
234
234
  </a>
235
235
  </div>
236
236
 
237
237
  <div class="method-description">
238
238
  <p><a class="source-toggle" href="#"
239
- onclick="toggleCode('M000088-source');return false;">[Source]</a></p>
240
- <div class="method-source-code" id="M000088-source">
239
+ onclick="toggleCode('M000095-source');return false;">[Source]</a></p>
240
+ <div class="method-source-code" id="M000095-source">
241
241
  <pre>
242
242
  <span class="ruby-comment cmt"># File erubis/enhancer.rb, line 537</span>
243
243
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">convert</span>(<span class="ruby-identifier">input</span>)
@@ -86,7 +86,8 @@ howto:
86
86
  require 'erubis/helpers/rails_helper'
87
87
  #Erubis::Helpers::RailsHelper.engine_class = Erubis::Eruby # or Erubis::FastEruby
88
88
  #Erubis::Helpers::RailsHelper.init_properties = {}
89
- #Erubis::Helpers::RailsHelper.show_src = false # set true for debugging
89
+ #Erubis::Helpers::RailsHelper.show_src = false # set true for debugging
90
+ #Erubis::Helpers::RailsHelper.preprocessing = true # set true to enable preprocessing
90
91
  </pre>
91
92
  </li>
92
93
  <li>(optional) apply the patch for &#8216;action_view/base.rb&#8216;
@@ -120,6 +121,8 @@ debug.
120
121
  <a href="#M000079">engine_class=</a>&nbsp;&nbsp;
121
122
  <a href="#M000080">init_properties</a>&nbsp;&nbsp;
122
123
  <a href="#M000081">init_properties=</a>&nbsp;&nbsp;
124
+ <a href="#M000084">preprocessing</a>&nbsp;&nbsp;
125
+ <a href="#M000085">preprocessing=</a>&nbsp;&nbsp;
123
126
  <a href="#M000082">show_src</a>&nbsp;&nbsp;
124
127
  <a href="#M000083">show_src=</a>&nbsp;&nbsp;
125
128
  </div>
@@ -132,6 +135,12 @@ debug.
132
135
 
133
136
  <div id="section">
134
137
 
138
+ <div id="class-list">
139
+ <h3 class="section-bar">Classes and Modules</h3>
140
+
141
+ Class <a href="RailsHelper/PreprocessingEruby.html" class="link">Erubis::Helpers::RailsHelper::PreprocessingEruby</a><br />
142
+
143
+ </div>
135
144
 
136
145
 
137
146
 
@@ -161,7 +170,7 @@ href="../FastEruby.html">Erubis::FastEruby</a>
161
170
  onclick="toggleCode('M000078-source');return false;">[Source]</a></p>
162
171
  <div class="method-source-code" id="M000078-source">
163
172
  <pre>
164
- <span class="ruby-comment cmt"># File erubis/helpers/rails_helper.rb, line 51</span>
173
+ <span class="ruby-comment cmt"># File erubis/helpers/rails_helper.rb, line 53</span>
165
174
  <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">engine_class</span>
166
175
  <span class="ruby-ivar">@@engine_class</span>
167
176
  <span class="ruby-keyword kw">end</span>
@@ -184,7 +193,7 @@ href="../FastEruby.html">Erubis::FastEruby</a>
184
193
  onclick="toggleCode('M000079-source');return false;">[Source]</a></p>
185
194
  <div class="method-source-code" id="M000079-source">
186
195
  <pre>
187
- <span class="ruby-comment cmt"># File erubis/helpers/rails_helper.rb, line 55</span>
196
+ <span class="ruby-comment cmt"># File erubis/helpers/rails_helper.rb, line 57</span>
188
197
  <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>)
189
198
  <span class="ruby-ivar">@@engine_class</span> = <span class="ruby-identifier">klass</span>
190
199
  <span class="ruby-keyword kw">end</span>
@@ -207,7 +216,7 @@ href="../FastEruby.html">Erubis::FastEruby</a>
207
216
  onclick="toggleCode('M000080-source');return false;">[Source]</a></p>
208
217
  <div class="method-source-code" id="M000080-source">
209
218
  <pre>
210
- <span class="ruby-comment cmt"># File erubis/helpers/rails_helper.rb, line 62</span>
219
+ <span class="ruby-comment cmt"># File erubis/helpers/rails_helper.rb, line 64</span>
211
220
  <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">init_properties</span>
212
221
  <span class="ruby-ivar">@@init_properties</span>
213
222
  <span class="ruby-keyword kw">end</span>
@@ -230,7 +239,7 @@ href="../FastEruby.html">Erubis::FastEruby</a>
230
239
  onclick="toggleCode('M000081-source');return false;">[Source]</a></p>
231
240
  <div class="method-source-code" id="M000081-source">
232
241
  <pre>
233
- <span class="ruby-comment cmt"># File erubis/helpers/rails_helper.rb, line 66</span>
242
+ <span class="ruby-comment cmt"># File erubis/helpers/rails_helper.rb, line 68</span>
234
243
  <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>)
235
244
  <span class="ruby-ivar">@@init_properties</span> = <span class="ruby-identifier">hash</span>
236
245
  <span class="ruby-keyword kw">end</span>
@@ -239,6 +248,52 @@ href="../FastEruby.html">Erubis::FastEruby</a>
239
248
  </div>
240
249
  </div>
241
250
 
251
+ <div id="method-M000084" class="method-detail">
252
+ <a name="M000084"></a>
253
+
254
+ <div class="method-heading">
255
+ <a href="#M000084" class="method-signature">
256
+ <span class="method-name">preprocessing</span><span class="method-args">()</span>
257
+ </a>
258
+ </div>
259
+
260
+ <div class="method-description">
261
+ <p><a class="source-toggle" href="#"
262
+ onclick="toggleCode('M000084-source');return false;">[Source]</a></p>
263
+ <div class="method-source-code" id="M000084-source">
264
+ <pre>
265
+ <span class="ruby-comment cmt"># File erubis/helpers/rails_helper.rb, line 85</span>
266
+ <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">preprocessing</span>
267
+ <span class="ruby-ivar">@@preprocessing</span>
268
+ <span class="ruby-keyword kw">end</span>
269
+ </pre>
270
+ </div>
271
+ </div>
272
+ </div>
273
+
274
+ <div id="method-M000085" class="method-detail">
275
+ <a name="M000085"></a>
276
+
277
+ <div class="method-heading">
278
+ <a href="#M000085" class="method-signature">
279
+ <span class="method-name">preprocessing=</span><span class="method-args">(flag)</span>
280
+ </a>
281
+ </div>
282
+
283
+ <div class="method-description">
284
+ <p><a class="source-toggle" href="#"
285
+ onclick="toggleCode('M000085-source');return false;">[Source]</a></p>
286
+ <div class="method-source-code" id="M000085-source">
287
+ <pre>
288
+ <span class="ruby-comment cmt"># File erubis/helpers/rails_helper.rb, line 88</span>
289
+ <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>)
290
+ <span class="ruby-ivar">@@preprocessing</span> = <span class="ruby-identifier">flag</span>
291
+ <span class="ruby-keyword kw">end</span>
292
+ </pre>
293
+ </div>
294
+ </div>
295
+ </div>
296
+
242
297
  <div id="method-M000082" class="method-detail">
243
298
  <a name="M000082"></a>
244
299
 
@@ -253,7 +308,7 @@ href="../FastEruby.html">Erubis::FastEruby</a>
253
308
  onclick="toggleCode('M000082-source');return false;">[Source]</a></p>
254
309
  <div class="method-source-code" id="M000082-source">
255
310
  <pre>
256
- <span class="ruby-comment cmt"># File erubis/helpers/rails_helper.rb, line 73</span>
311
+ <span class="ruby-comment cmt"># File erubis/helpers/rails_helper.rb, line 75</span>
257
312
  <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">show_src</span>
258
313
  <span class="ruby-ivar">@@show_src</span>
259
314
  <span class="ruby-keyword kw">end</span>
@@ -276,7 +331,7 @@ href="../FastEruby.html">Erubis::FastEruby</a>
276
331
  onclick="toggleCode('M000083-source');return false;">[Source]</a></p>
277
332
  <div class="method-source-code" id="M000083-source">
278
333
  <pre>
279
- <span class="ruby-comment cmt"># File erubis/helpers/rails_helper.rb, line 77</span>
334
+ <span class="ruby-comment cmt"># File erubis/helpers/rails_helper.rb, line 79</span>
280
335
  <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>)
281
336
  <span class="ruby-ivar">@@show_src</span> = <span class="ruby-identifier">flag</span>
282
337
  <span class="ruby-keyword kw">end</span>