erubis 2.2.0 → 2.3.0
Sign up to get free protection for your applications and to get access to all the features.
- 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
@@ -0,0 +1,132 @@
|
|
1
|
+
=begin
|
2
|
+
|
3
|
+
= apache/erubis-run.rb
|
4
|
+
|
5
|
+
Copyright (C) 2007 Andrew R Jackson <arjackson at acm dot org>
|
6
|
+
|
7
|
+
Built from original by Shugo Maeda:
|
8
|
+
Copyright (C) 2001 Shugo Maeda <shugo@modruby.net>
|
9
|
+
|
10
|
+
All rights reserved.
|
11
|
+
|
12
|
+
Redistribution and use in source and binary forms, with or without
|
13
|
+
modification, are permitted provided that the following conditions
|
14
|
+
are met:
|
15
|
+
1. Redistributions of source code must retain the above copyright
|
16
|
+
notice, this list of conditions and the following disclaimer.
|
17
|
+
2. Redistributions in binary form must reproduce the above copyright
|
18
|
+
notice, this list of conditions and the following disclaimer in the
|
19
|
+
documentation and/or other materials provided with the distribution.
|
20
|
+
|
21
|
+
THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
|
22
|
+
ANY EXPRESS OR IMPLIED WAreqANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
23
|
+
IMPLIED WAreqANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
24
|
+
ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
|
25
|
+
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
26
|
+
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
27
|
+
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTEreqUPTION)
|
28
|
+
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
29
|
+
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
30
|
+
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
31
|
+
SUCH DAMAGE.
|
32
|
+
|
33
|
+
== Overview
|
34
|
+
|
35
|
+
Apache::ErubisRun handles eRuby files with erubis
|
36
|
+
|
37
|
+
== Example of httpd.conf
|
38
|
+
|
39
|
+
RubyRequire apache/erubis-run
|
40
|
+
<Location /eruby>
|
41
|
+
SetHandler ruby-object
|
42
|
+
RubyHandler Apache::ErubisRun.instance
|
43
|
+
</Location>
|
44
|
+
|
45
|
+
=end
|
46
|
+
|
47
|
+
require "singleton"
|
48
|
+
require "tempfile"
|
49
|
+
require "eruby" # Still needed to bring in a couple useful helper methods
|
50
|
+
require "erubis"
|
51
|
+
|
52
|
+
module Erubis
|
53
|
+
@@cgi = nil
|
54
|
+
|
55
|
+
def self.cgi
|
56
|
+
return @@cgi
|
57
|
+
end
|
58
|
+
|
59
|
+
def self.cgi=(cgi)
|
60
|
+
@@cgi = cgi
|
61
|
+
end
|
62
|
+
end
|
63
|
+
|
64
|
+
module Apache
|
65
|
+
class ErubisRun
|
66
|
+
include Singleton
|
67
|
+
|
68
|
+
def handler(req)
|
69
|
+
status = check_request(req)
|
70
|
+
return status if(status != OK)
|
71
|
+
|
72
|
+
filename = req.filename.dup
|
73
|
+
filename.untaint
|
74
|
+
erubis = compile(filename)
|
75
|
+
prerun(req)
|
76
|
+
begin
|
77
|
+
run(erubis, filename)
|
78
|
+
ensure
|
79
|
+
postrun(req)
|
80
|
+
end
|
81
|
+
|
82
|
+
return OK
|
83
|
+
end
|
84
|
+
|
85
|
+
private
|
86
|
+
|
87
|
+
def initialize
|
88
|
+
@compiler = nil
|
89
|
+
end
|
90
|
+
|
91
|
+
def check_request(req)
|
92
|
+
if(req.method_number == M_OPTIONS)
|
93
|
+
req.allowed |= (1 << M_GET)
|
94
|
+
req.allowed |= (1 << M_POST)
|
95
|
+
return DECLINED
|
96
|
+
end
|
97
|
+
if(req.finfo.mode == 0)
|
98
|
+
return NOT_FOUND
|
99
|
+
end
|
100
|
+
return OK
|
101
|
+
end
|
102
|
+
|
103
|
+
def compile(filename)
|
104
|
+
@compiler = Erubis::Eruby.load_file(filename) # use caching version as much as possible
|
105
|
+
return @compiler
|
106
|
+
end
|
107
|
+
|
108
|
+
def prerun(req)
|
109
|
+
Erubis.cgi = nil
|
110
|
+
req.setup_cgi_env
|
111
|
+
Apache.chdir_file(req.filename)
|
112
|
+
end
|
113
|
+
|
114
|
+
def run(erubis, filename)
|
115
|
+
binding = eval_string_wrap("binding")
|
116
|
+
puts erubis.result(binding) # eval the code in the context of the same binding ERuby uses
|
117
|
+
end
|
118
|
+
|
119
|
+
def postrun(req)
|
120
|
+
if(cgi = Erubis.cgi)
|
121
|
+
# TODO: pull the content type header from the cgi object, if set there?
|
122
|
+
elsif(req.sync_output or req.sync_header)
|
123
|
+
# Do nothing: header has already been sent
|
124
|
+
else
|
125
|
+
unless(req.content_type)
|
126
|
+
req.content_type = format("text/html;")
|
127
|
+
end
|
128
|
+
req.send_http_header
|
129
|
+
end
|
130
|
+
end
|
131
|
+
end
|
132
|
+
end
|
data/contrib/inline-require
CHANGED
@@ -5,10 +5,10 @@
|
|
5
5
|
|
6
6
|
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
7
7
|
<head>
|
8
|
-
<title>Module: ERB</title>
|
8
|
+
<title>Module: ActionView::Base::ERB</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
|
-
<link rel="stylesheet" href="
|
11
|
+
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
12
12
|
<script type="text/javascript">
|
13
13
|
// <![CDATA[
|
14
14
|
|
@@ -50,7 +50,7 @@
|
|
50
50
|
<table class="header-table">
|
51
51
|
<tr class="top-aligned-row">
|
52
52
|
<td><strong>Module</strong></td>
|
53
|
-
<td class="class-name-in-header">ERB</td>
|
53
|
+
<td class="class-name-in-header">ActionView::Base::ERB</td>
|
54
54
|
</tr>
|
55
55
|
<tr class="top-aligned-row">
|
56
56
|
<td><strong>In:</strong></td>
|
data/doc-api/classes/Erubis.html
CHANGED
@@ -223,11 +223,14 @@ Module <a href="Erubis/Basic.html" class="link">Erubis::Basic</a><br />
|
|
223
223
|
Module <a href="Erubis/BiPatternEnhancer.html" class="link">Erubis::BiPatternEnhancer</a><br />
|
224
224
|
Module <a href="Erubis/CGenerator.html" class="link">Erubis::CGenerator</a><br />
|
225
225
|
Module <a href="Erubis/Converter.html" class="link">Erubis::Converter</a><br />
|
226
|
+
Module <a href="Erubis/DeleteIndentEnhancer.html" class="link">Erubis::DeleteIndentEnhancer</a><br />
|
227
|
+
Module <a href="Erubis/ErboutEnhancer.html" class="link">Erubis::ErboutEnhancer</a><br />
|
226
228
|
Module <a href="Erubis/EscapeEnhancer.html" class="link">Erubis::EscapeEnhancer</a><br />
|
227
229
|
Module <a href="Erubis/Evaluator.html" class="link">Erubis::Evaluator</a><br />
|
228
230
|
Module <a href="Erubis/Generator.html" class="link">Erubis::Generator</a><br />
|
229
231
|
Module <a href="Erubis/HeaderFooterEnhancer.html" class="link">Erubis::HeaderFooterEnhancer</a><br />
|
230
232
|
Module <a href="Erubis/Helpers.html" class="link">Erubis::Helpers</a><br />
|
233
|
+
Module <a href="Erubis/InterpolationEnhancer.html" class="link">Erubis::InterpolationEnhancer</a><br />
|
231
234
|
Module <a href="Erubis/JavaGenerator.html" class="link">Erubis::JavaGenerator</a><br />
|
232
235
|
Module <a href="Erubis/JavascriptGenerator.html" class="link">Erubis::JavascriptGenerator</a><br />
|
233
236
|
Module <a href="Erubis/NoCodeEnhancer.html" class="link">Erubis::NoCodeEnhancer</a><br />
|
@@ -251,12 +254,14 @@ Class <a href="Erubis/ArrayEruby.html" class="link">Erubis::ArrayEruby</a><br />
|
|
251
254
|
Class <a href="Erubis/BiPatternEruby.html" class="link">Erubis::BiPatternEruby</a><br />
|
252
255
|
Class <a href="Erubis/CommandOptionError.html" class="link">Erubis::CommandOptionError</a><br />
|
253
256
|
Class <a href="Erubis/Context.html" class="link">Erubis::Context</a><br />
|
257
|
+
Class <a href="Erubis/DeleteIndentEruby.html" class="link">Erubis::DeleteIndentEruby</a><br />
|
254
258
|
Class <a href="Erubis/Ec.html" class="link">Erubis::Ec</a><br />
|
255
259
|
Class <a href="Erubis/Ejava.html" class="link">Erubis::Ejava</a><br />
|
256
260
|
Class <a href="Erubis/Ejavascript.html" class="link">Erubis::Ejavascript</a><br />
|
257
261
|
Class <a href="Erubis/Engine.html" class="link">Erubis::Engine</a><br />
|
258
262
|
Class <a href="Erubis/Eperl.html" class="link">Erubis::Eperl</a><br />
|
259
263
|
Class <a href="Erubis/Ephp.html" class="link">Erubis::Ephp</a><br />
|
264
|
+
Class <a href="Erubis/ErboutEruby.html" class="link">Erubis::ErboutEruby</a><br />
|
260
265
|
Class <a href="Erubis/ErubisError.html" class="link">Erubis::ErubisError</a><br />
|
261
266
|
Class <a href="Erubis/Eruby.html" class="link">Erubis::Eruby</a><br />
|
262
267
|
Class <a href="Erubis/EscapedEc.html" class="link">Erubis::EscapedEc</a><br />
|
@@ -267,7 +272,9 @@ Class <a href="Erubis/EscapedEphp.html" class="link">Erubis::EscapedEphp</a><br
|
|
267
272
|
Class <a href="Erubis/EscapedEruby.html" class="link">Erubis::EscapedEruby</a><br />
|
268
273
|
Class <a href="Erubis/EscapedEscheme.html" class="link">Erubis::EscapedEscheme</a><br />
|
269
274
|
Class <a href="Erubis/Escheme.html" class="link">Erubis::Escheme</a><br />
|
275
|
+
Class <a href="Erubis/FastEruby.html" class="link">Erubis::FastEruby</a><br />
|
270
276
|
Class <a href="Erubis/HeaderFooterEruby.html" class="link">Erubis::HeaderFooterEruby</a><br />
|
277
|
+
Class <a href="Erubis/InterpolationEruby.html" class="link">Erubis::InterpolationEruby</a><br />
|
271
278
|
Class <a href="Erubis/Main.html" class="link">Erubis::Main</a><br />
|
272
279
|
Class <a href="Erubis/NoCodeEruby.html" class="link">Erubis::NoCodeEruby</a><br />
|
273
280
|
Class <a href="Erubis/NoTextEruby.html" class="link">Erubis::NoTextEruby</a><br />
|
@@ -306,7 +313,7 @@ Class <a href="Erubis/XmlEruby.html" class="link">Erubis::XmlEruby</a><br />
|
|
306
313
|
<tr class="top-aligned-row context-row">
|
307
314
|
<td class="context-item-name">VERSION</td>
|
308
315
|
<td>=</td>
|
309
|
-
<td class="context-item-value">('$Release: 2.
|
316
|
+
<td class="context-item-value">('$Release: 2.3.0 $' =~ /([.\d]+)/) && $1</td>
|
310
317
|
</tr>
|
311
318
|
</table>
|
312
319
|
</div>
|
@@ -89,8 +89,8 @@ this is only for <a href="Eruby.html">Eruby</a>.
|
|
89
89
|
<h3 class="section-bar">Methods</h3>
|
90
90
|
|
91
91
|
<div class="name-list">
|
92
|
-
<a href="#
|
93
|
-
<a href="#
|
92
|
+
<a href="#M000155">add_postamble</a>
|
93
|
+
<a href="#M000154">add_preamble</a>
|
94
94
|
</div>
|
95
95
|
</div>
|
96
96
|
|
@@ -112,19 +112,19 @@ this is only for <a href="Eruby.html">Eruby</a>.
|
|
112
112
|
<div id="methods">
|
113
113
|
<h3 class="section-bar">Public Instance methods</h3>
|
114
114
|
|
115
|
-
<div id="method-
|
116
|
-
<a name="
|
115
|
+
<div id="method-M000155" class="method-detail">
|
116
|
+
<a name="M000155"></a>
|
117
117
|
|
118
118
|
<div class="method-heading">
|
119
|
-
<a href="#
|
119
|
+
<a href="#M000155" class="method-signature">
|
120
120
|
<span class="method-name">add_postamble</span><span class="method-args">(src)</span>
|
121
121
|
</a>
|
122
122
|
</div>
|
123
123
|
|
124
124
|
<div class="method-description">
|
125
125
|
<p><a class="source-toggle" href="#"
|
126
|
-
onclick="toggleCode('
|
127
|
-
<div class="method-source-code" id="
|
126
|
+
onclick="toggleCode('M000155-source');return false;">[Source]</a></p>
|
127
|
+
<div class="method-source-code" id="M000155-source">
|
128
128
|
<pre>
|
129
129
|
<span class="ruby-comment cmt"># File erubis/enhancer.rb, line 169</span>
|
130
130
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">add_postamble</span>(<span class="ruby-identifier">src</span>)
|
@@ -136,19 +136,19 @@ this is only for <a href="Eruby.html">Eruby</a>.
|
|
136
136
|
</div>
|
137
137
|
</div>
|
138
138
|
|
139
|
-
<div id="method-
|
140
|
-
<a name="
|
139
|
+
<div id="method-M000154" class="method-detail">
|
140
|
+
<a name="M000154"></a>
|
141
141
|
|
142
142
|
<div class="method-heading">
|
143
|
-
<a href="#
|
143
|
+
<a href="#M000154" class="method-signature">
|
144
144
|
<span class="method-name">add_preamble</span><span class="method-args">(src)</span>
|
145
145
|
</a>
|
146
146
|
</div>
|
147
147
|
|
148
148
|
<div class="method-description">
|
149
149
|
<p><a class="source-toggle" href="#"
|
150
|
-
onclick="toggleCode('
|
151
|
-
<div class="method-source-code" id="
|
150
|
+
onclick="toggleCode('M000154-source');return false;">[Source]</a></p>
|
151
|
+
<div class="method-source-code" id="M000154-source">
|
152
152
|
<pre>
|
153
153
|
<span class="ruby-comment cmt"># File erubis/enhancer.rb, line 165</span>
|
154
154
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">add_preamble</span>(<span class="ruby-identifier">src</span>)
|
@@ -86,10 +86,10 @@ basic converter which supports ’<% … %>’ notation.
|
|
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="#M000059">add_expr</a>
|
90
|
+
<a href="#M000058">convert_input</a>
|
91
|
+
<a href="#M000056">init_converter</a>
|
92
|
+
<a href="#M000057">pattern_regexp</a>
|
93
93
|
</div>
|
94
94
|
</div>
|
95
95
|
|
@@ -156,11 +156,11 @@ DEFAULT_REGEXP = /<%(=+|\#)?(.*?)-?%>([ \t]*\r?\n)?/m
|
|
156
156
|
<div id="methods">
|
157
157
|
<h3 class="section-bar">Public Instance methods</h3>
|
158
158
|
|
159
|
-
<div id="method-
|
160
|
-
<a name="
|
159
|
+
<div id="method-M000059" class="method-detail">
|
160
|
+
<a name="M000059"></a>
|
161
161
|
|
162
162
|
<div class="method-heading">
|
163
|
-
<a href="#
|
163
|
+
<a href="#M000059" class="method-signature">
|
164
164
|
<span class="method-name">add_expr</span><span class="method-args">(src, code, indicator)</span>
|
165
165
|
</a>
|
166
166
|
</div>
|
@@ -170,8 +170,8 @@ DEFAULT_REGEXP = /<%(=+|\#)?(.*?)-?%>([ \t]*\r?\n)?/m
|
|
170
170
|
add expression code to src
|
171
171
|
</p>
|
172
172
|
<p><a class="source-toggle" href="#"
|
173
|
-
onclick="toggleCode('
|
174
|
-
<div class="method-source-code" id="
|
173
|
+
onclick="toggleCode('M000059-source');return false;">[Source]</a></p>
|
174
|
+
<div class="method-source-code" id="M000059-source">
|
175
175
|
<pre>
|
176
176
|
<span class="ruby-comment cmt"># File erubis/converter.rb, line 171</span>
|
177
177
|
<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>)
|
@@ -189,19 +189,19 @@ add expression code to src
|
|
189
189
|
</div>
|
190
190
|
</div>
|
191
191
|
|
192
|
-
<div id="method-
|
193
|
-
<a name="
|
192
|
+
<div id="method-M000058" class="method-detail">
|
193
|
+
<a name="M000058"></a>
|
194
194
|
|
195
195
|
<div class="method-heading">
|
196
|
-
<a href="#
|
196
|
+
<a href="#M000058" class="method-signature">
|
197
197
|
<span class="method-name">convert_input</span><span class="method-args">(src, input)</span>
|
198
198
|
</a>
|
199
199
|
</div>
|
200
200
|
|
201
201
|
<div class="method-description">
|
202
202
|
<p><a class="source-toggle" href="#"
|
203
|
-
onclick="toggleCode('
|
204
|
-
<div class="method-source-code" id="
|
203
|
+
onclick="toggleCode('M000058-source');return false;">[Source]</a></p>
|
204
|
+
<div class="method-source-code" id="M000058-source">
|
205
205
|
<pre>
|
206
206
|
<span class="ruby-comment cmt"># File erubis/converter.rb, line 127</span>
|
207
207
|
<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>)
|
@@ -251,19 +251,19 @@ add expression code to src
|
|
251
251
|
</div>
|
252
252
|
</div>
|
253
253
|
|
254
|
-
<div id="method-
|
255
|
-
<a name="
|
254
|
+
<div id="method-M000056" class="method-detail">
|
255
|
+
<a name="M000056"></a>
|
256
256
|
|
257
257
|
<div class="method-heading">
|
258
|
-
<a href="#
|
258
|
+
<a href="#M000056" class="method-signature">
|
259
259
|
<span class="method-name">init_converter</span><span class="method-args">(properties={})</span>
|
260
260
|
</a>
|
261
261
|
</div>
|
262
262
|
|
263
263
|
<div class="method-description">
|
264
264
|
<p><a class="source-toggle" href="#"
|
265
|
-
onclick="toggleCode('
|
266
|
-
<div class="method-source-code" id="
|
265
|
+
onclick="toggleCode('M000056-source');return false;">[Source]</a></p>
|
266
|
+
<div class="method-source-code" id="M000056-source">
|
267
267
|
<pre>
|
268
268
|
<span class="ruby-comment cmt"># File erubis/converter.rb, line 103</span>
|
269
269
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">init_converter</span>(<span class="ruby-identifier">properties</span>={})
|
@@ -278,11 +278,11 @@ add expression code to src
|
|
278
278
|
|
279
279
|
<h3 class="section-bar">Protected Instance methods</h3>
|
280
280
|
|
281
|
-
<div id="method-
|
282
|
-
<a name="
|
281
|
+
<div id="method-M000057" class="method-detail">
|
282
|
+
<a name="M000057"></a>
|
283
283
|
|
284
284
|
<div class="method-heading">
|
285
|
-
<a href="#
|
285
|
+
<a href="#M000057" class="method-signature">
|
286
286
|
<span class="method-name">pattern_regexp</span><span class="method-args">(pattern)</span>
|
287
287
|
</a>
|
288
288
|
</div>
|
@@ -292,8 +292,8 @@ add expression code to src
|
|
292
292
|
return regexp of pattern to parse eRuby script
|
293
293
|
</p>
|
294
294
|
<p><a class="source-toggle" href="#"
|
295
|
-
onclick="toggleCode('
|
296
|
-
<div class="method-source-code" id="
|
295
|
+
onclick="toggleCode('M000057-source');return false;">[Source]</a></p>
|
296
|
+
<div class="method-source-code" id="M000057-source">
|
297
297
|
<pre>
|
298
298
|
<span class="ruby-comment cmt"># File erubis/converter.rb, line 112</span>
|
299
299
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">pattern_regexp</span>(<span class="ruby-identifier">pattern</span>)
|
@@ -119,8 +119,8 @@ this is language independent.
|
|
119
119
|
<h3 class="section-bar">Methods</h3>
|
120
120
|
|
121
121
|
<div class="name-list">
|
122
|
-
<a href="#
|
123
|
-
<a href="#
|
122
|
+
<a href="#M000127">add_text</a>
|
123
|
+
<a href="#M000126">new</a>
|
124
124
|
</div>
|
125
125
|
</div>
|
126
126
|
|
@@ -142,21 +142,21 @@ this is language independent.
|
|
142
142
|
<div id="methods">
|
143
143
|
<h3 class="section-bar">Public Class methods</h3>
|
144
144
|
|
145
|
-
<div id="method-
|
146
|
-
<a name="
|
145
|
+
<div id="method-M000126" class="method-detail">
|
146
|
+
<a name="M000126"></a>
|
147
147
|
|
148
148
|
<div class="method-heading">
|
149
|
-
<a href="#
|
149
|
+
<a href="#M000126" class="method-signature">
|
150
150
|
<span class="method-name">new</span><span class="method-args">(input, properties={})</span>
|
151
151
|
</a>
|
152
152
|
</div>
|
153
153
|
|
154
154
|
<div class="method-description">
|
155
155
|
<p><a class="source-toggle" href="#"
|
156
|
-
onclick="toggleCode('
|
157
|
-
<div class="method-source-code" id="
|
156
|
+
onclick="toggleCode('M000126-source');return false;">[Source]</a></p>
|
157
|
+
<div class="method-source-code" id="M000126-source">
|
158
158
|
<pre>
|
159
|
-
<span class="ruby-comment cmt"># File erubis/enhancer.rb, line
|
159
|
+
<span class="ruby-comment cmt"># File erubis/enhancer.rb, line 408</span>
|
160
160
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">input</span>, <span class="ruby-identifier">properties</span>={})
|
161
161
|
<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">bipattern</span> = <span class="ruby-identifier">properties</span>[<span class="ruby-identifier">:bipattern</span>] <span class="ruby-comment cmt"># or '\$\{ \}'</span>
|
162
162
|
<span class="ruby-keyword kw">super</span>
|
@@ -168,21 +168,21 @@ this is language independent.
|
|
168
168
|
|
169
169
|
<h3 class="section-bar">Public Instance methods</h3>
|
170
170
|
|
171
|
-
<div id="method-
|
172
|
-
<a name="
|
171
|
+
<div id="method-M000127" class="method-detail">
|
172
|
+
<a name="M000127"></a>
|
173
173
|
|
174
174
|
<div class="method-heading">
|
175
|
-
<a href="#
|
175
|
+
<a href="#M000127" class="method-signature">
|
176
176
|
<span class="method-name">add_text</span><span class="method-args">(src, text)</span>
|
177
177
|
</a>
|
178
178
|
</div>
|
179
179
|
|
180
180
|
<div class="method-description">
|
181
181
|
<p><a class="source-toggle" href="#"
|
182
|
-
onclick="toggleCode('
|
183
|
-
<div class="method-source-code" id="
|
182
|
+
onclick="toggleCode('M000127-source');return false;">[Source]</a></p>
|
183
|
+
<div class="method-source-code" id="M000127-source">
|
184
184
|
<pre>
|
185
|
-
<span class="ruby-comment cmt"># File erubis/enhancer.rb, line
|
185
|
+
<span class="ruby-comment cmt"># File erubis/enhancer.rb, line 420</span>
|
186
186
|
<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>)
|
187
187
|
<span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">text</span>
|
188
188
|
<span class="ruby-identifier">text</span>.<span class="ruby-identifier">scan</span>(<span class="ruby-ivar">@bipattern_regexp</span>) <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">txt</span>, <span class="ruby-identifier">indicator</span>, <span class="ruby-identifier">code</span><span class="ruby-operator">|</span>
|