erubis 2.2.0 → 2.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/CHANGES +120 -3
- data/README.txt +1 -1
- data/benchmark/Makefile +6 -0
- data/benchmark/bench.rb +306 -0
- data/benchmark/{erubybench.yaml → bench_context.yaml} +20 -20
- data/benchmark/templates/_footer.html +4 -0
- data/benchmark/{erubybench.rhtml → templates/_header.html} +1 -34
- data/benchmark/templates/bench_erb.rhtml +29 -0
- data/benchmark/templates/bench_erubis.rhtml +29 -0
- data/benchmark/templates/bench_eruby.rhtml +29 -0
- data/bin/erubis +2 -2
- data/contrib/erubis +3 -3114
- data/contrib/erubis-run.rb +132 -0
- data/contrib/inline-require +1 -1
- data/doc-api/classes/{ERB.html → ActionView/Base/ERB.html} +3 -3
- data/doc-api/classes/Erubis.html +8 -1
- data/doc-api/classes/Erubis/ArrayEnhancer.html +12 -12
- data/doc-api/classes/Erubis/Basic/Converter.html +24 -24
- data/doc-api/classes/Erubis/BiPatternEnhancer.html +14 -14
- data/doc-api/classes/Erubis/CGenerator.html +60 -60
- data/doc-api/classes/Erubis/Context.html +42 -42
- data/doc-api/classes/Erubis/Converter.html +27 -27
- data/doc-api/classes/Erubis/DeleteIndentEnhancer.html +150 -0
- data/doc-api/classes/Erubis/DeleteIndentEruby.html +120 -0
- data/doc-api/classes/Erubis/Engine.html +31 -31
- data/doc-api/classes/Erubis/ErboutEnhancer.html +175 -0
- data/doc-api/classes/Erubis/ErboutEruby.html +120 -0
- data/doc-api/classes/Erubis/Eruby.html +5 -0
- data/doc-api/classes/Erubis/EscapeEnhancer.html +6 -6
- data/doc-api/classes/Erubis/Evaluator.html +19 -19
- data/doc-api/classes/Erubis/FastEruby.html +131 -0
- data/doc-api/classes/Erubis/HeaderFooterEnhancer.html +14 -14
- data/doc-api/classes/Erubis/Helpers/RailsHelper.html +49 -45
- data/doc-api/classes/Erubis/InterpolationEnhancer.html +304 -0
- data/doc-api/classes/Erubis/InterpolationEruby.html +120 -0
- data/doc-api/classes/Erubis/JavaGenerator.html +54 -54
- data/doc-api/classes/Erubis/JavascriptGenerator.html +60 -60
- data/doc-api/classes/Erubis/Main.html +35 -27
- data/doc-api/classes/Erubis/NoCodeEnhancer.html +5 -5
- data/doc-api/classes/Erubis/NoTextEnhancer.html +7 -7
- data/doc-api/classes/Erubis/OptimizedEruby.html +6 -6
- data/doc-api/classes/Erubis/OptimizedGenerator.html +72 -72
- data/doc-api/classes/Erubis/OptimizedXmlEruby.html +6 -6
- data/doc-api/classes/Erubis/PI/Converter.html +18 -18
- data/doc-api/classes/Erubis/PI/Ec.html +6 -6
- data/doc-api/classes/Erubis/PI/Ejava.html +6 -6
- data/doc-api/classes/Erubis/PI/Ejavascript.html +6 -6
- data/doc-api/classes/Erubis/PI/Eperl.html +6 -6
- data/doc-api/classes/Erubis/PI/Ephp.html +6 -6
- data/doc-api/classes/Erubis/PI/Eruby.html +7 -7
- data/doc-api/classes/Erubis/PI/Escheme.html +6 -6
- data/doc-api/classes/Erubis/PI/TinyEruby.html +24 -24
- data/doc-api/classes/Erubis/PercentLineEnhancer.html +8 -8
- data/doc-api/classes/Erubis/PerlGenerator.html +54 -54
- data/doc-api/classes/Erubis/PhpGenerator.html +54 -54
- data/doc-api/classes/Erubis/PrintEnabledEnhancer.html +20 -20
- data/doc-api/classes/Erubis/PrintOutEnhancer.html +30 -30
- data/doc-api/classes/Erubis/RubyEvaluator.html +12 -12
- data/doc-api/classes/Erubis/RubyGenerator.html +48 -48
- data/doc-api/classes/Erubis/SchemeGenerator.html +60 -60
- data/doc-api/classes/Erubis/SimplifyEnhancer.html +8 -8
- data/doc-api/classes/Erubis/StdoutEnhancer.html +12 -12
- data/doc-api/classes/Erubis/StringBufferEnhancer.html +12 -12
- data/doc-api/classes/Erubis/TinyEruby.html +24 -24
- data/doc-api/classes/Erubis/XmlHelper.html +14 -14
- data/doc-api/created.rid +1 -1
- data/doc-api/files/README_txt.html +4 -4
- data/doc-api/files/erubis/context_rb.html +2 -2
- data/doc-api/files/erubis/converter_rb.html +2 -2
- data/doc-api/files/erubis/engine/ec_rb.html +2 -2
- data/doc-api/files/erubis/engine/ejava_rb.html +2 -2
- data/doc-api/files/erubis/engine/ejavascript_rb.html +2 -2
- data/doc-api/files/erubis/engine/enhanced_rb.html +2 -2
- data/doc-api/files/erubis/engine/eperl_rb.html +2 -2
- data/doc-api/files/erubis/engine/ephp_rb.html +2 -2
- data/doc-api/files/erubis/engine/eruby_rb.html +2 -2
- data/doc-api/files/erubis/engine/escheme_rb.html +2 -2
- data/doc-api/files/erubis/engine/optimized_rb.html +2 -2
- data/doc-api/files/erubis/engine_rb.html +2 -2
- data/doc-api/files/erubis/enhancer_rb.html +2 -2
- data/doc-api/files/erubis/error_rb.html +2 -2
- data/doc-api/files/erubis/evaluator_rb.html +2 -2
- data/doc-api/files/erubis/generator_rb.html +2 -2
- data/doc-api/files/erubis/helper_rb.html +2 -2
- data/doc-api/files/erubis/helpers/rails_helper_rb.html +2 -2
- data/doc-api/files/erubis/local-setting_rb.html +2 -2
- data/doc-api/files/erubis/main_rb.html +2 -2
- data/doc-api/files/erubis/tiny_rb.html +2 -2
- data/doc-api/files/erubis_rb.html +1 -1
- data/doc-api/fr_class_index.html +8 -1
- data/doc-api/fr_method_index.html +166 -158
- data/doc/users-guide.html +623 -215
- data/lib/erubis.rb +2 -2
- data/lib/erubis/context.rb +2 -2
- data/lib/erubis/converter.rb +2 -2
- data/lib/erubis/engine.rb +3 -3
- data/lib/erubis/engine/ec.rb +2 -2
- data/lib/erubis/engine/ejava.rb +2 -2
- data/lib/erubis/engine/ejavascript.rb +2 -2
- data/lib/erubis/engine/enhanced.rb +17 -2
- data/lib/erubis/engine/eperl.rb +2 -2
- data/lib/erubis/engine/ephp.rb +2 -2
- data/lib/erubis/engine/eruby.rb +10 -2
- data/lib/erubis/engine/escheme.rb +2 -2
- data/lib/erubis/engine/optimized.rb +2 -2
- data/lib/erubis/enhancer.rb +134 -25
- data/lib/erubis/error.rb +2 -2
- data/lib/erubis/evaluator.rb +2 -2
- data/lib/erubis/generator.rb +2 -2
- data/lib/erubis/helper.rb +2 -2
- data/lib/erubis/helpers/rails_helper.rb +19 -75
- data/lib/erubis/local-setting.rb +2 -2
- data/lib/erubis/main.rb +63 -36
- data/lib/erubis/tiny.rb +2 -2
- data/test/assert-text-equal.rb +2 -2
- data/test/data/users-guide/Example.ejava +55 -0
- data/test/data/users-guide/array_example.result +9 -0
- data/test/data/users-guide/arraybuffer_example.result +9 -0
- data/test/data/users-guide/bipattern-example.rhtml +4 -0
- data/test/data/users-guide/bipattern_example.result +6 -0
- data/test/data/users-guide/context.rb +6 -0
- data/test/data/users-guide/context.yaml +8 -0
- data/test/data/users-guide/escape_example.result +9 -0
- data/test/data/users-guide/example.ec +27 -0
- data/test/data/users-guide/example.ejs +20 -0
- data/test/data/users-guide/example.eperl +18 -0
- data/test/data/users-guide/example.ephp +18 -0
- data/test/data/users-guide/example.eruby +6 -0
- data/test/data/users-guide/example.escheme +28 -0
- data/test/data/users-guide/example1.eruby +6 -0
- data/test/data/users-guide/example1.rb +16 -0
- data/test/data/users-guide/example1.result +16 -0
- data/test/data/users-guide/example10.rb +4 -0
- data/test/data/users-guide/example10.result +17 -0
- data/test/data/users-guide/example10.xhtml +14 -0
- data/test/data/users-guide/example10_x.result +17 -0
- data/test/data/users-guide/example11.php +20 -0
- data/test/data/users-guide/example11.result +23 -0
- data/test/data/users-guide/example11.rhtml +21 -0
- data/test/data/users-guide/example11_C.result +10 -0
- data/test/data/users-guide/example11_N.result +16 -0
- data/test/data/users-guide/example11_U.result +16 -0
- data/test/data/users-guide/example11_php.result +15 -0
- data/test/data/users-guide/example1_x.result +9 -0
- data/test/data/users-guide/example2.eruby +7 -0
- data/test/data/users-guide/example2.rb +10 -0
- data/test/data/users-guide/example2.result +27 -0
- data/test/data/users-guide/example2_trim.result +10 -0
- data/test/data/users-guide/example2_x.result +10 -0
- data/test/data/users-guide/example3.eruby +6 -0
- data/test/data/users-guide/example3.rb +10 -0
- data/test/data/users-guide/example31.result +22 -0
- data/test/data/users-guide/example32.result +4 -0
- data/test/data/users-guide/example3_e.result +8 -0
- data/test/data/users-guide/example4.eruby +3 -0
- data/test/data/users-guide/example4.rb +11 -0
- data/test/data/users-guide/example4.result +10 -0
- data/test/data/users-guide/example4_x.result +5 -0
- data/test/data/users-guide/example5.eruby +6 -0
- data/test/data/users-guide/example5.rb +16 -0
- data/test/data/users-guide/example5.result +7 -0
- data/test/data/users-guide/example6.rb +12 -0
- data/test/data/users-guide/example6.result +7 -0
- data/test/data/users-guide/example7.eruby +8 -0
- data/test/data/users-guide/example71.result +13 -0
- data/test/data/users-guide/example72.result +13 -0
- data/test/data/users-guide/example8.eruby +6 -0
- data/test/data/users-guide/example8_ruby.result +7 -0
- data/test/data/users-guide/example8_yaml.result +7 -0
- data/test/data/users-guide/example9.eruby +3 -0
- data/test/data/users-guide/example9.rb +8 -0
- data/test/data/users-guide/example9.result +9 -0
- data/test/data/users-guide/example91.result +5 -0
- data/test/data/users-guide/example92.result +4 -0
- data/test/data/users-guide/example_c.result +29 -0
- data/test/data/users-guide/example_java.result +56 -0
- data/test/data/users-guide/example_js.result +22 -0
- data/test/data/users-guide/example_perl.result +20 -0
- data/test/data/users-guide/example_php.result +19 -0
- data/test/data/users-guide/example_scheme.result +30 -0
- data/test/data/users-guide/example_scheme_display.result +29 -0
- data/test/data/users-guide/fasteruby.rb +11 -0
- data/test/data/users-guide/fasteruby.result +38 -0
- data/test/data/users-guide/fasteruby.rhtml +15 -0
- data/test/data/users-guide/headerfooter-example.eruby +9 -0
- data/test/data/users-guide/headerfooter-example2.rb +8 -0
- data/test/data/users-guide/headerfooter-example2.rhtml +10 -0
- data/test/data/users-guide/headerfooter_example.result +11 -0
- data/test/data/users-guide/headerfooter_example2.result +13 -0
- data/test/data/users-guide/interpolation_example.result +9 -0
- data/test/data/users-guide/nocode-example.eruby +14 -0
- data/test/data/users-guide/nocode-php.result +20 -0
- data/test/data/users-guide/nocode_example.result +15 -0
- data/test/data/users-guide/normal-eruby-test.eruby +9 -0
- data/test/data/users-guide/normal_eruby_test.result +11 -0
- data/test/data/users-guide/notext-example.eruby +14 -0
- data/test/data/users-guide/notext-example.php +19 -0
- data/test/data/users-guide/notext-php.result +20 -0
- data/test/data/users-guide/notext_example.result +16 -0
- data/test/data/users-guide/percentline-example.rhtml +4 -0
- data/test/data/users-guide/percentline_example.result +7 -0
- data/test/data/users-guide/printenable_example.result +4 -0
- data/test/data/users-guide/printenabled-example.eruby +3 -0
- data/test/data/users-guide/printenabled-example.rb +8 -0
- data/test/data/users-guide/printstatement_example.result +8 -0
- data/test/data/users-guide/simplify_example.result +9 -0
- data/test/data/users-guide/stdout_exmple.result +9 -0
- data/test/data/users-guide/stringbuffer_example.result +9 -0
- data/test/test-engines.rb +2 -2
- data/test/test-enhancers.rb +569 -0
- data/test/test-erubis.rb +3 -380
- data/test/test-main.rb +39 -15
- data/test/test-users-guide.rb +56 -0
- data/test/test.rb +4 -3
- data/test/testutil.rb +2 -2
- metadata +166 -57
- data/benchmark/erubybench-lib.rb +0 -189
- data/benchmark/erubybench.rb +0 -600
- data/bin/notext +0 -154
- data/test/test-notext.rb +0 -27
|
@@ -74,7 +74,7 @@
|
|
|
74
74
|
|
|
75
75
|
<div id="description">
|
|
76
76
|
<p>
|
|
77
|
-
<a href="Converter.html#
|
|
77
|
+
<a href="Converter.html#M000075">convert</a>
|
|
78
78
|
</p>
|
|
79
79
|
|
|
80
80
|
</div>
|
|
@@ -86,10 +86,10 @@
|
|
|
86
86
|
<h3 class="section-bar">Methods</h3>
|
|
87
87
|
|
|
88
88
|
<div class="name-list">
|
|
89
|
-
<a href="#
|
|
90
|
-
<a href="#
|
|
91
|
-
<a href="#
|
|
92
|
-
<a href="#
|
|
89
|
+
<a href="#M000075">convert</a>
|
|
90
|
+
<a href="#M000077">convert_input</a>
|
|
91
|
+
<a href="#M000076">detect_spaces_at_bol</a>
|
|
92
|
+
<a href="#M000074">init_converter</a>
|
|
93
93
|
</div>
|
|
94
94
|
</div>
|
|
95
95
|
|
|
@@ -134,23 +134,23 @@
|
|
|
134
134
|
<div id="methods">
|
|
135
135
|
<h3 class="section-bar">Public Instance methods</h3>
|
|
136
136
|
|
|
137
|
-
<div id="method-
|
|
138
|
-
<a name="
|
|
137
|
+
<div id="method-M000075" class="method-detail">
|
|
138
|
+
<a name="M000075"></a>
|
|
139
139
|
|
|
140
140
|
<div class="method-heading">
|
|
141
|
-
<a href="#
|
|
141
|
+
<a href="#M000075" class="method-signature">
|
|
142
142
|
<span class="method-name">convert</span><span class="method-args">(input)</span>
|
|
143
143
|
</a>
|
|
144
144
|
</div>
|
|
145
145
|
|
|
146
146
|
<div class="method-description">
|
|
147
147
|
<p>
|
|
148
|
-
<a href="Converter.html#
|
|
148
|
+
<a href="Converter.html#M000075">convert</a> input string into target
|
|
149
149
|
language
|
|
150
150
|
</p>
|
|
151
151
|
<p><a class="source-toggle" href="#"
|
|
152
|
-
onclick="toggleCode('
|
|
153
|
-
<div class="method-source-code" id="
|
|
152
|
+
onclick="toggleCode('M000075-source');return false;">[Source]</a></p>
|
|
153
|
+
<div class="method-source-code" id="M000075-source">
|
|
154
154
|
<pre>
|
|
155
155
|
<span class="ruby-comment cmt"># File erubis/converter.rb, line 34</span>
|
|
156
156
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">convert</span>(<span class="ruby-identifier">input</span>)
|
|
@@ -165,19 +165,19 @@ language
|
|
|
165
165
|
</div>
|
|
166
166
|
</div>
|
|
167
167
|
|
|
168
|
-
<div id="method-
|
|
169
|
-
<a name="
|
|
168
|
+
<div id="method-M000074" class="method-detail">
|
|
169
|
+
<a name="M000074"></a>
|
|
170
170
|
|
|
171
171
|
<div class="method-heading">
|
|
172
|
-
<a href="#
|
|
172
|
+
<a href="#M000074" class="method-signature">
|
|
173
173
|
<span class="method-name">init_converter</span><span class="method-args">(properties={})</span>
|
|
174
174
|
</a>
|
|
175
175
|
</div>
|
|
176
176
|
|
|
177
177
|
<div class="method-description">
|
|
178
178
|
<p><a class="source-toggle" href="#"
|
|
179
|
-
onclick="toggleCode('
|
|
180
|
-
<div class="method-source-code" id="
|
|
179
|
+
onclick="toggleCode('M000074-source');return false;">[Source]</a></p>
|
|
180
|
+
<div class="method-source-code" id="M000074-source">
|
|
181
181
|
<pre>
|
|
182
182
|
<span class="ruby-comment cmt"># File erubis/converter.rb, line 27</span>
|
|
183
183
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">init_converter</span>(<span class="ruby-identifier">properties</span>={})
|
|
@@ -192,22 +192,22 @@ language
|
|
|
192
192
|
|
|
193
193
|
<h3 class="section-bar">Protected Instance methods</h3>
|
|
194
194
|
|
|
195
|
-
<div id="method-
|
|
196
|
-
<a name="
|
|
195
|
+
<div id="method-M000077" class="method-detail">
|
|
196
|
+
<a name="M000077"></a>
|
|
197
197
|
|
|
198
198
|
<div class="method-heading">
|
|
199
|
-
<a href="#
|
|
199
|
+
<a href="#M000077" class="method-signature">
|
|
200
200
|
<span class="method-name">convert_input</span><span class="method-args">(codebuf, input)</span>
|
|
201
201
|
</a>
|
|
202
202
|
</div>
|
|
203
203
|
|
|
204
204
|
<div class="method-description">
|
|
205
205
|
<p>
|
|
206
|
-
(abstract) <a href="Converter.html#
|
|
206
|
+
(abstract) <a href="Converter.html#M000075">convert</a> input to code
|
|
207
207
|
</p>
|
|
208
208
|
<p><a class="source-toggle" href="#"
|
|
209
|
-
onclick="toggleCode('
|
|
210
|
-
<div class="method-source-code" id="
|
|
209
|
+
onclick="toggleCode('M000077-source');return false;">[Source]</a></p>
|
|
210
|
+
<div class="method-source-code" id="M000077-source">
|
|
211
211
|
<pre>
|
|
212
212
|
<span class="ruby-comment cmt"># File erubis/converter.rb, line 77</span>
|
|
213
213
|
<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>)
|
|
@@ -218,11 +218,11 @@ language
|
|
|
218
218
|
</div>
|
|
219
219
|
</div>
|
|
220
220
|
|
|
221
|
-
<div id="method-
|
|
222
|
-
<a name="
|
|
221
|
+
<div id="method-M000076" class="method-detail">
|
|
222
|
+
<a name="M000076"></a>
|
|
223
223
|
|
|
224
224
|
<div class="method-heading">
|
|
225
|
-
<a href="#
|
|
225
|
+
<a href="#M000076" class="method-signature">
|
|
226
226
|
<span class="method-name">detect_spaces_at_bol</span><span class="method-args">(text, is_bol)</span>
|
|
227
227
|
</a>
|
|
228
228
|
</div>
|
|
@@ -232,8 +232,8 @@ language
|
|
|
232
232
|
detect spaces at beginning of line
|
|
233
233
|
</p>
|
|
234
234
|
<p><a class="source-toggle" href="#"
|
|
235
|
-
onclick="toggleCode('
|
|
236
|
-
<div class="method-source-code" id="
|
|
235
|
+
onclick="toggleCode('M000076-source');return false;">[Source]</a></p>
|
|
236
|
+
<div class="method-source-code" id="M000076-source">
|
|
237
237
|
<pre>
|
|
238
238
|
<span class="ruby-comment cmt"># File erubis/converter.rb, line 47</span>
|
|
239
239
|
<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>)
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
|
2
|
+
<!DOCTYPE html
|
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
5
|
+
|
|
6
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
|
7
|
+
<head>
|
|
8
|
+
<title>Module: Erubis::DeleteIndentEnhancer</title>
|
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
|
10
|
+
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
|
11
|
+
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
|
12
|
+
<script type="text/javascript">
|
|
13
|
+
// <![CDATA[
|
|
14
|
+
|
|
15
|
+
function popupCode( url ) {
|
|
16
|
+
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
function toggleCode( id ) {
|
|
20
|
+
if ( document.getElementById )
|
|
21
|
+
elem = document.getElementById( id );
|
|
22
|
+
else if ( document.all )
|
|
23
|
+
elem = eval( "document.all." + id );
|
|
24
|
+
else
|
|
25
|
+
return false;
|
|
26
|
+
|
|
27
|
+
elemStyle = elem.style;
|
|
28
|
+
|
|
29
|
+
if ( elemStyle.display != "block" ) {
|
|
30
|
+
elemStyle.display = "block"
|
|
31
|
+
} else {
|
|
32
|
+
elemStyle.display = "none"
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
return true;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
// Make codeblocks hidden by default
|
|
39
|
+
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
|
40
|
+
|
|
41
|
+
// ]]>
|
|
42
|
+
</script>
|
|
43
|
+
|
|
44
|
+
</head>
|
|
45
|
+
<body>
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
<div id="classHeader">
|
|
50
|
+
<table class="header-table">
|
|
51
|
+
<tr class="top-aligned-row">
|
|
52
|
+
<td><strong>Module</strong></td>
|
|
53
|
+
<td class="class-name-in-header">Erubis::DeleteIndentEnhancer</td>
|
|
54
|
+
</tr>
|
|
55
|
+
<tr class="top-aligned-row">
|
|
56
|
+
<td><strong>In:</strong></td>
|
|
57
|
+
<td>
|
|
58
|
+
<a href="../../files/erubis/enhancer_rb.html">
|
|
59
|
+
erubis/enhancer.rb
|
|
60
|
+
</a>
|
|
61
|
+
<br />
|
|
62
|
+
</td>
|
|
63
|
+
</tr>
|
|
64
|
+
|
|
65
|
+
</table>
|
|
66
|
+
</div>
|
|
67
|
+
<!-- banner header -->
|
|
68
|
+
|
|
69
|
+
<div id="bodyContent">
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
<div id="contextContent">
|
|
74
|
+
|
|
75
|
+
<div id="description">
|
|
76
|
+
<p>
|
|
77
|
+
delete indentation of HTML.
|
|
78
|
+
</p>
|
|
79
|
+
<p>
|
|
80
|
+
this is language-independent.
|
|
81
|
+
</p>
|
|
82
|
+
|
|
83
|
+
</div>
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
</div>
|
|
87
|
+
|
|
88
|
+
<div id="method-list">
|
|
89
|
+
<h3 class="section-bar">Methods</h3>
|
|
90
|
+
|
|
91
|
+
<div class="name-list">
|
|
92
|
+
<a href="#M000156">convert_input</a>
|
|
93
|
+
</div>
|
|
94
|
+
</div>
|
|
95
|
+
|
|
96
|
+
</div>
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
<!-- if includes -->
|
|
100
|
+
|
|
101
|
+
<div id="section">
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
|
|
110
|
+
<!-- if method_list -->
|
|
111
|
+
<div id="methods">
|
|
112
|
+
<h3 class="section-bar">Public Instance methods</h3>
|
|
113
|
+
|
|
114
|
+
<div id="method-M000156" class="method-detail">
|
|
115
|
+
<a name="M000156"></a>
|
|
116
|
+
|
|
117
|
+
<div class="method-heading">
|
|
118
|
+
<a href="#M000156" class="method-signature">
|
|
119
|
+
<span class="method-name">convert_input</span><span class="method-args">(src, input)</span>
|
|
120
|
+
</a>
|
|
121
|
+
</div>
|
|
122
|
+
|
|
123
|
+
<div class="method-description">
|
|
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">
|
|
127
|
+
<pre>
|
|
128
|
+
<span class="ruby-comment cmt"># File erubis/enhancer.rb, line 556</span>
|
|
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>)
|
|
130
|
+
<span class="ruby-identifier">input</span> = <span class="ruby-identifier">input</span>.<span class="ruby-identifier">gsub</span>(<span class="ruby-regexp re">/^[ \t]+</</span>, <span class="ruby-value str">'<'</span>)
|
|
131
|
+
<span class="ruby-keyword kw">super</span>(<span class="ruby-identifier">src</span>, <span class="ruby-identifier">input</span>)
|
|
132
|
+
<span class="ruby-keyword kw">end</span>
|
|
133
|
+
</pre>
|
|
134
|
+
</div>
|
|
135
|
+
</div>
|
|
136
|
+
</div>
|
|
137
|
+
|
|
138
|
+
|
|
139
|
+
</div>
|
|
140
|
+
|
|
141
|
+
|
|
142
|
+
</div>
|
|
143
|
+
|
|
144
|
+
|
|
145
|
+
<div id="validator-badges">
|
|
146
|
+
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
|
147
|
+
</div>
|
|
148
|
+
|
|
149
|
+
</body>
|
|
150
|
+
</html>
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
|
2
|
+
<!DOCTYPE html
|
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
5
|
+
|
|
6
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
|
7
|
+
<head>
|
|
8
|
+
<title>Class: Erubis::DeleteIndentEruby</title>
|
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
|
10
|
+
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
|
11
|
+
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
|
12
|
+
<script type="text/javascript">
|
|
13
|
+
// <![CDATA[
|
|
14
|
+
|
|
15
|
+
function popupCode( url ) {
|
|
16
|
+
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
function toggleCode( id ) {
|
|
20
|
+
if ( document.getElementById )
|
|
21
|
+
elem = document.getElementById( id );
|
|
22
|
+
else if ( document.all )
|
|
23
|
+
elem = eval( "document.all." + id );
|
|
24
|
+
else
|
|
25
|
+
return false;
|
|
26
|
+
|
|
27
|
+
elemStyle = elem.style;
|
|
28
|
+
|
|
29
|
+
if ( elemStyle.display != "block" ) {
|
|
30
|
+
elemStyle.display = "block"
|
|
31
|
+
} else {
|
|
32
|
+
elemStyle.display = "none"
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
return true;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
// Make codeblocks hidden by default
|
|
39
|
+
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
|
40
|
+
|
|
41
|
+
// ]]>
|
|
42
|
+
</script>
|
|
43
|
+
|
|
44
|
+
</head>
|
|
45
|
+
<body>
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
<div id="classHeader">
|
|
50
|
+
<table class="header-table">
|
|
51
|
+
<tr class="top-aligned-row">
|
|
52
|
+
<td><strong>Class</strong></td>
|
|
53
|
+
<td class="class-name-in-header">Erubis::DeleteIndentEruby</td>
|
|
54
|
+
</tr>
|
|
55
|
+
<tr class="top-aligned-row">
|
|
56
|
+
<td><strong>In:</strong></td>
|
|
57
|
+
<td>
|
|
58
|
+
<a href="../../files/erubis/engine/enhanced_rb.html">
|
|
59
|
+
erubis/engine/enhanced.rb
|
|
60
|
+
</a>
|
|
61
|
+
<br />
|
|
62
|
+
</td>
|
|
63
|
+
</tr>
|
|
64
|
+
|
|
65
|
+
<tr class="top-aligned-row">
|
|
66
|
+
<td><strong>Parent:</strong></td>
|
|
67
|
+
<td>
|
|
68
|
+
<a href="Eruby.html">
|
|
69
|
+
Eruby
|
|
70
|
+
</a>
|
|
71
|
+
</td>
|
|
72
|
+
</tr>
|
|
73
|
+
</table>
|
|
74
|
+
</div>
|
|
75
|
+
<!-- banner header -->
|
|
76
|
+
|
|
77
|
+
<div id="bodyContent">
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
<div id="contextContent">
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
</div>
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
</div>
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
<!-- if includes -->
|
|
92
|
+
<div id="includes">
|
|
93
|
+
<h3 class="section-bar">Included Modules</h3>
|
|
94
|
+
|
|
95
|
+
<div id="includes-list">
|
|
96
|
+
<span class="include-name"><a href="DeleteIndentEnhancer.html">DeleteIndentEnhancer</a></span>
|
|
97
|
+
</div>
|
|
98
|
+
</div>
|
|
99
|
+
|
|
100
|
+
<div id="section">
|
|
101
|
+
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
<!-- if method_list -->
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
</div>
|
|
113
|
+
|
|
114
|
+
|
|
115
|
+
<div id="validator-badges">
|
|
116
|
+
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
|
117
|
+
</div>
|
|
118
|
+
|
|
119
|
+
</body>
|
|
120
|
+
</html>
|
|
@@ -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="#
|
|
97
|
-
<a href="#
|
|
98
|
-
<a href="#
|
|
99
|
-
<a href="#
|
|
100
|
-
<a href="#
|
|
96
|
+
<a href="#M000166">convert!</a>
|
|
97
|
+
<a href="#M000167">load_file</a>
|
|
98
|
+
<a href="#M000165">new</a>
|
|
99
|
+
<a href="#M000168">process</a>
|
|
100
|
+
<a href="#M000169">process_proc</a>
|
|
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-
|
|
123
|
-
<a name="
|
|
122
|
+
<div id="method-M000167" class="method-detail">
|
|
123
|
+
<a name="M000167"></a>
|
|
124
124
|
|
|
125
125
|
<div class="method-heading">
|
|
126
|
-
<a href="#
|
|
126
|
+
<a href="#M000167" 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 + ’.cache’) automatically.
|
|
135
135
|
</p>
|
|
136
136
|
<p><a class="source-toggle" href="#"
|
|
137
|
-
onclick="toggleCode('
|
|
138
|
-
<div class="method-source-code" id="
|
|
137
|
+
onclick="toggleCode('M000167-source');return false;">[Source]</a></p>
|
|
138
|
+
<div class="method-source-code" id="M000167-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 + ’.cache’) automatically.
|
|
|
160
160
|
</div>
|
|
161
161
|
</div>
|
|
162
162
|
|
|
163
|
-
<div id="method-
|
|
164
|
-
<a name="
|
|
163
|
+
<div id="method-M000165" class="method-detail">
|
|
164
|
+
<a name="M000165"></a>
|
|
165
165
|
|
|
166
166
|
<div class="method-heading">
|
|
167
|
-
<a href="#
|
|
167
|
+
<a href="#M000165" 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('
|
|
180
|
-
<div class="method-source-code" id="
|
|
179
|
+
onclick="toggleCode('M000165-source');return false;">[Source]</a></p>
|
|
180
|
+
<div class="method-source-code" id="M000165-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-
|
|
198
|
-
<a name="
|
|
197
|
+
<div id="method-M000166" class="method-detail">
|
|
198
|
+
<a name="M000166"></a>
|
|
199
199
|
|
|
200
200
|
<div class="method-heading">
|
|
201
|
-
<a href="#
|
|
201
|
+
<a href="#M000166" 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('
|
|
212
|
-
<div class="method-source-code" id="
|
|
211
|
+
onclick="toggleCode('M000166-source');return false;">[Source]</a></p>
|
|
212
|
+
<div class="method-source-code" id="M000166-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-
|
|
224
|
-
<a name="
|
|
223
|
+
<div id="method-M000168" class="method-detail">
|
|
224
|
+
<a name="M000168"></a>
|
|
225
225
|
|
|
226
226
|
<div class="method-heading">
|
|
227
|
-
<a href="#
|
|
227
|
+
<a href="#M000168" 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('
|
|
239
|
-
<div class="method-source-code" id="
|
|
238
|
+
onclick="toggleCode('M000168-source');return false;">[Source]</a></p>
|
|
239
|
+
<div class="method-source-code" id="M000168-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,23 +254,23 @@ context may be Binding, Hash, or Object.
|
|
|
254
254
|
</div>
|
|
255
255
|
</div>
|
|
256
256
|
|
|
257
|
-
<div id="method-
|
|
258
|
-
<a name="
|
|
257
|
+
<div id="method-M000169" class="method-detail">
|
|
258
|
+
<a name="M000169"></a>
|
|
259
259
|
|
|
260
260
|
<div class="method-heading">
|
|
261
|
-
<a href="#
|
|
261
|
+
<a href="#M000169" 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>
|
|
265
265
|
|
|
266
266
|
<div class="method-description">
|
|
267
267
|
<p>
|
|
268
|
-
helper method evaluate Proc object
|
|
268
|
+
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('
|
|
273
|
-
<div class="method-source-code" id="
|
|
272
|
+
onclick="toggleCode('M000169-source');return false;">[Source]</a></p>
|
|
273
|
+
<div class="method-source-code" id="M000169-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>)
|