erubis 2.3.1 → 2.7.0
Sign up to get free protection for your applications and to get access to all the features.
- data/{CHANGES → CHANGES.txt} +373 -3
- data/MIT-LICENSE +1 -1
- data/README.txt +6 -5
- data/benchmark/bench.rb +18 -11
- data/bin/erubis +3 -4
- data/contrib/erubis +3462 -5
- data/contrib/inline-require +54 -28
- data/doc/docstyle.css +25 -4
- data/doc/users-guide.html +814 -110
- data/doc-api/classes/ActionView/TemplateHandlers/ErubisHandler.html +209 -0
- data/doc-api/classes/ActionView.html +105 -0
- data/doc-api/classes/Erubis/ArrayBufferEnhancer.html +14 -14
- data/doc-api/classes/Erubis/ArrayEnhancer.html +16 -16
- data/doc-api/classes/Erubis/Basic/Converter.html +36 -31
- data/doc-api/classes/Erubis/BiPatternEnhancer.html +16 -13
- data/doc-api/classes/Erubis/CGenerator.html +70 -70
- data/doc-api/classes/Erubis/Context.html +49 -49
- data/doc-api/classes/Erubis/Converter.html +30 -29
- data/doc-api/classes/Erubis/CppGenerator.html +382 -0
- data/doc-api/classes/Erubis/DeleteIndentEnhancer.html +7 -7
- data/doc-api/classes/Erubis/Ecpp.html +126 -0
- data/doc-api/classes/Erubis/Engine.html +46 -43
- data/doc-api/classes/Erubis/ErboutEnhancer.html +16 -16
- data/doc-api/classes/Erubis/EscapeEnhancer.html +7 -7
- data/doc-api/classes/Erubis/EscapedEcpp.html +120 -0
- data/doc-api/classes/Erubis/Evaluator.html +22 -22
- data/doc-api/classes/Erubis/Generator.html +70 -70
- data/doc-api/classes/Erubis/HeaderFooterEnhancer.html +18 -15
- data/doc-api/classes/Erubis/Helpers/RailsFormHelper.html +787 -0
- data/doc-api/classes/Erubis/Helpers/RailsHelper/TemplateConverter.html +213 -0
- data/doc-api/classes/Erubis/Helpers/RailsHelper.html +103 -54
- data/doc-api/classes/Erubis/Helpers.html +6 -1
- data/doc-api/classes/Erubis/InterpolationEnhancer.html +42 -41
- data/doc-api/classes/Erubis/JavaGenerator.html +69 -69
- data/doc-api/classes/Erubis/JavascriptGenerator.html +79 -74
- data/doc-api/classes/Erubis/Main.html +49 -48
- data/doc-api/classes/Erubis/NoCodeEnhancer.html +35 -35
- data/doc-api/classes/Erubis/NoTextEnhancer.html +7 -7
- data/doc-api/classes/Erubis/OptimizedEruby.html +7 -7
- data/doc-api/classes/Erubis/OptimizedGenerator.html +84 -84
- data/doc-api/classes/Erubis/OptimizedXmlEruby.html +7 -7
- data/doc-api/classes/Erubis/PI/Converter.html +23 -22
- data/doc-api/classes/Erubis/PI/Ec.html +7 -7
- data/doc-api/classes/Erubis/PI/Ecpp.html +166 -0
- data/doc-api/classes/Erubis/PI/Ejava.html +7 -7
- data/doc-api/classes/Erubis/PI/Ejavascript.html +7 -7
- data/doc-api/classes/Erubis/PI/Eperl.html +7 -7
- data/doc-api/classes/Erubis/PI/Ephp.html +7 -7
- data/doc-api/classes/Erubis/PI/Eruby.html +6 -6
- data/doc-api/classes/Erubis/PI/Escheme.html +7 -7
- data/doc-api/classes/Erubis/PI/TinyEruby.html +28 -27
- data/doc-api/classes/Erubis/PI.html +1 -0
- data/doc-api/classes/Erubis/PercentLineEnhancer.html +18 -29
- data/doc-api/classes/Erubis/PerlGenerator.html +63 -63
- data/doc-api/classes/Erubis/PhpGenerator.html +63 -63
- data/doc-api/classes/Erubis/PrefixedLineEnhancer.html +210 -0
- data/doc-api/classes/Erubis/PrefixedLineEruby.html +120 -0
- data/doc-api/classes/Erubis/PreprocessingEruby.html +183 -0
- data/doc-api/classes/Erubis/PreprocessingHelper.html +212 -0
- data/doc-api/classes/Erubis/PrintEnabledEnhancer.html +23 -23
- data/doc-api/classes/Erubis/PrintOutEnhancer.html +38 -38
- data/doc-api/classes/Erubis/RubyEvaluator.html +59 -22
- data/doc-api/classes/Erubis/RubyGenerator.html +53 -52
- data/doc-api/classes/Erubis/SchemeGenerator.html +70 -70
- data/doc-api/classes/Erubis/SimplifyEnhancer.html +10 -9
- data/doc-api/classes/Erubis/StdoutEnhancer.html +3 -3
- data/doc-api/classes/Erubis/StringBufferEnhancer.html +16 -16
- data/doc-api/classes/Erubis/TinyEruby.html +33 -33
- data/doc-api/classes/Erubis/XmlHelper.html +80 -15
- data/doc-api/classes/Erubis.html +25 -1
- data/doc-api/classes/Kernel.html +155 -0
- data/doc-api/created.rid +1 -1
- data/doc-api/files/README_txt.html +8 -8
- data/doc-api/files/erubis/context_rb.html +2 -2
- data/doc-api/files/erubis/converter_rb.html +3 -3
- data/doc-api/files/erubis/engine/ec_rb.html +2 -2
- data/doc-api/files/erubis/engine/ecpp_rb.html +115 -0
- 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 +3 -3
- data/doc-api/files/erubis/helper_rb.html +2 -2
- data/doc-api/files/erubis/helpers/rails_form_helper_rb.html +107 -0
- data/doc-api/files/erubis/helpers/rails_helper_rb.html +3 -2
- data/doc-api/files/erubis/local-setting_rb.html +2 -2
- data/doc-api/files/erubis/main_rb.html +4 -2
- data/doc-api/files/erubis/preprocessing_rb.html +114 -0
- data/doc-api/files/erubis/tiny_rb.html +2 -2
- data/doc-api/files/erubis/util_rb.html +107 -0
- data/doc-api/files/erubis_rb.html +2 -2
- data/doc-api/fr_class_index.html +13 -0
- data/doc-api/fr_file_index.html +4 -0
- data/doc-api/fr_method_index.html +237 -179
- data/examples/basic/Makefile +7 -2
- data/examples/basic/example.ecpp +33 -0
- data/lib/erubis/context.rb +2 -3
- data/lib/erubis/converter.rb +17 -11
- data/lib/erubis/engine/ec.rb +2 -3
- data/lib/erubis/engine/ecpp.rb +113 -0
- data/lib/erubis/engine/ejava.rb +9 -10
- data/lib/erubis/engine/ejavascript.rb +14 -9
- data/lib/erubis/engine/enhanced.rb +7 -3
- data/lib/erubis/engine/eperl.rb +2 -3
- data/lib/erubis/engine/ephp.rb +2 -3
- data/lib/erubis/engine/eruby.rb +8 -8
- data/lib/erubis/engine/escheme.rb +2 -3
- data/lib/erubis/engine/optimized.rb +2 -3
- data/lib/erubis/engine.rb +13 -11
- data/lib/erubis/enhancer.rb +101 -34
- data/lib/erubis/error.rb +2 -3
- data/lib/erubis/evaluator.rb +27 -10
- data/lib/erubis/generator.rb +3 -4
- data/lib/erubis/helper.rb +14 -3
- data/lib/erubis/helpers/rails_form_helper.rb +197 -0
- data/lib/erubis/helpers/rails_helper.rb +219 -77
- data/lib/erubis/local-setting.rb +2 -3
- data/lib/erubis/main.rb +85 -60
- data/lib/erubis/preprocessing.rb +58 -0
- data/lib/erubis/tiny.rb +9 -9
- data/lib/erubis/util.rb +22 -0
- data/lib/erubis.rb +4 -4
- data/test/assert-text-equal.rb +2 -3
- data/test/data/users-guide/bufvar-example.rb +10 -0
- data/test/data/users-guide/bufvar-example.result +17 -0
- data/test/data/users-guide/def_method.rb +14 -0
- data/test/data/users-guide/def_method.result +3 -0
- data/test/data/users-guide/example.ecpp +30 -0
- data/test/data/users-guide/example1.rb +1 -0
- data/test/data/users-guide/example_c.result +22 -19
- data/test/data/users-guide/fasteruby-example.rb +8 -0
- data/test/data/users-guide/fasteruby-example.result +18 -0
- data/test/data/users-guide/main_program1.rb +8 -0
- data/test/data/users-guide/main_program1.result +6 -0
- data/test/data/users-guide/main_program2.rb +8 -0
- data/test/data/users-guide/main_program2.result +6 -0
- data/test/data/users-guide/percentline-example.rhtml +3 -1
- data/test/data/users-guide/percentline_example.result +5 -3
- data/test/data/users-guide/prefixedline-example.rb +9 -0
- data/test/data/users-guide/prefixedline-example.rhtml +6 -0
- data/test/data/users-guide/prefixedline_example.result +9 -0
- data/test/data/users-guide/tail_260.result +4 -0
- data/test/data/users-guide/tailnewline.rhtml +3 -0
- data/test/data/users-guide/template1.rhtml +4 -0
- data/test/data/users-guide/template2.rhtml +4 -0
- data/test/test-engines.rb +88 -5
- data/test/test-enhancers.rb +83 -6
- data/test/test-erubis.rb +115 -11
- data/test/test-index-cgi.rb +191 -0
- data/test/test-main.rb +143 -31
- data/test/test-users-guide.rb +20 -3
- data/test/test.rb +18 -3
- data/test/testutil.rb +44 -8
- metadata +104 -67
- data/contrib/action_view_base_rb.patch +0 -23
@@ -0,0 +1,126 @@
|
|
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::Ecpp</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::Ecpp</td>
|
54
|
+
</tr>
|
55
|
+
<tr class="top-aligned-row">
|
56
|
+
<td><strong>In:</strong></td>
|
57
|
+
<td>
|
58
|
+
<a href="../../files/erubis/engine/ecpp_rb.html">
|
59
|
+
erubis/engine/ecpp.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="Basic/Engine.html">
|
69
|
+
Basic::Engine
|
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
|
+
<div id="description">
|
84
|
+
<p>
|
85
|
+
engine for C
|
86
|
+
</p>
|
87
|
+
|
88
|
+
</div>
|
89
|
+
|
90
|
+
|
91
|
+
</div>
|
92
|
+
|
93
|
+
|
94
|
+
</div>
|
95
|
+
|
96
|
+
|
97
|
+
<!-- if includes -->
|
98
|
+
<div id="includes">
|
99
|
+
<h3 class="section-bar">Included Modules</h3>
|
100
|
+
|
101
|
+
<div id="includes-list">
|
102
|
+
<span class="include-name"><a href="CppGenerator.html">CppGenerator</a></span>
|
103
|
+
</div>
|
104
|
+
</div>
|
105
|
+
|
106
|
+
<div id="section">
|
107
|
+
|
108
|
+
|
109
|
+
|
110
|
+
|
111
|
+
|
112
|
+
|
113
|
+
|
114
|
+
|
115
|
+
<!-- if method_list -->
|
116
|
+
|
117
|
+
|
118
|
+
</div>
|
119
|
+
|
120
|
+
|
121
|
+
<div id="validator-badges">
|
122
|
+
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
123
|
+
</div>
|
124
|
+
|
125
|
+
</body>
|
126
|
+
</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="#M000223">convert!</a>
|
97
|
+
<a href="#M000224">load_file</a>
|
98
|
+
<a href="#M000222">new</a>
|
99
|
+
<a href="#M000225">process</a>
|
100
|
+
<a href="#M000226">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-M000224" class="method-detail">
|
123
|
+
<a name="M000224"></a>
|
124
124
|
|
125
125
|
<div class="method-heading">
|
126
|
-
<a href="#
|
126
|
+
<a href="#M000224" 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>
|
@@ -131,26 +131,29 @@ converter module.
|
|
131
131
|
<div class="method-description">
|
132
132
|
<p>
|
133
133
|
load file, write cache file, and return engine object. this method create
|
134
|
-
cache file
|
134
|
+
code cache file automatically. cachefile name can be specified with
|
135
|
+
properties[:cachename], or filname + ‘cache’ is used as
|
136
|
+
default.
|
135
137
|
</p>
|
136
138
|
<p><a class="source-toggle" href="#"
|
137
|
-
onclick="toggleCode('
|
138
|
-
<div class="method-source-code" id="
|
139
|
+
onclick="toggleCode('M000224-source');return false;">[Source]</a></p>
|
140
|
+
<div class="method-source-code" id="M000224-source">
|
139
141
|
<pre>
|
140
|
-
<span class="ruby-comment cmt"># File erubis/engine.rb, line
|
142
|
+
<span class="ruby-comment cmt"># File erubis/engine.rb, line 48</span>
|
141
143
|
<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>={})
|
142
|
-
<span class="ruby-identifier">cachename</span> = <span class="ruby-identifier">filename</span> <span class="ruby-operator">+</span> <span class="ruby-value str">'.cache'</span>
|
144
|
+
<span class="ruby-identifier">cachename</span> = <span class="ruby-identifier">properties</span>[<span class="ruby-identifier">:cachename</span>] <span class="ruby-operator">||</span> (<span class="ruby-identifier">filename</span> <span class="ruby-operator">+</span> <span class="ruby-value str">'.cache'</span>)
|
143
145
|
<span class="ruby-identifier">properties</span>[<span class="ruby-identifier">:filename</span>] = <span class="ruby-identifier">filename</span>
|
144
|
-
<span class="ruby-
|
146
|
+
<span class="ruby-identifier">timestamp</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">mtime</span>(<span class="ruby-identifier">filename</span>)
|
147
|
+
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">test</span>(<span class="ruby-value">?f</span>, <span class="ruby-identifier">cachename</span>) <span class="ruby-operator">&&</span> <span class="ruby-identifier">timestamp</span> <span class="ruby-operator">==</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">mtime</span>(<span class="ruby-identifier">cachename</span>)
|
145
148
|
<span class="ruby-identifier">engine</span> = <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">new</span>(<span class="ruby-keyword kw">nil</span>, <span class="ruby-identifier">properties</span>)
|
146
149
|
<span class="ruby-identifier">engine</span>.<span class="ruby-identifier">src</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">read</span>(<span class="ruby-identifier">cachename</span>)
|
147
150
|
<span class="ruby-keyword kw">else</span>
|
148
|
-
<span class="ruby-identifier">input</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">open</span>(<span class="ruby-identifier">filename</span>, <span class="ruby-value str">'rb'</span>) {
|
151
|
+
<span class="ruby-identifier">input</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">open</span>(<span class="ruby-identifier">filename</span>, <span class="ruby-value str">'rb'</span>) {<span class="ruby-operator">|</span><span class="ruby-identifier">f</span><span class="ruby-operator">|</span> <span class="ruby-identifier">f</span>.<span class="ruby-identifier">read</span> }
|
149
152
|
<span class="ruby-identifier">engine</span> = <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">input</span>, <span class="ruby-identifier">properties</span>)
|
150
|
-
<span class="ruby-
|
151
|
-
|
152
|
-
|
153
|
-
<span class="ruby-
|
153
|
+
<span class="ruby-identifier">tmpname</span> = <span class="ruby-identifier">cachename</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">rand</span>().<span class="ruby-identifier">to_s</span>[<span class="ruby-value">1</span>,<span class="ruby-value">8</span>]
|
154
|
+
<span class="ruby-constant">File</span>.<span class="ruby-identifier">open</span>(<span class="ruby-identifier">tmpname</span>, <span class="ruby-value str">'wb'</span>) {<span class="ruby-operator">|</span><span class="ruby-identifier">f</span><span class="ruby-operator">|</span> <span class="ruby-identifier">f</span>.<span class="ruby-identifier">write</span>(<span class="ruby-identifier">engine</span>.<span class="ruby-identifier">src</span>) }
|
155
|
+
<span class="ruby-constant">File</span>.<span class="ruby-identifier">rename</span>(<span class="ruby-identifier">tmpname</span>, <span class="ruby-identifier">cachename</span>)
|
156
|
+
<span class="ruby-constant">File</span>.<span class="ruby-identifier">utime</span>(<span class="ruby-identifier">timestamp</span>, <span class="ruby-identifier">timestamp</span>, <span class="ruby-identifier">cachename</span>)
|
154
157
|
<span class="ruby-keyword kw">end</span>
|
155
158
|
<span class="ruby-identifier">engine</span>.<span class="ruby-identifier">src</span>.<span class="ruby-identifier">untaint</span> <span class="ruby-comment cmt"># ok?</span>
|
156
159
|
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">engine</span>
|
@@ -160,11 +163,11 @@ cache file (filename + ’.cache’) automatically.
|
|
160
163
|
</div>
|
161
164
|
</div>
|
162
165
|
|
163
|
-
<div id="method-
|
164
|
-
<a name="
|
166
|
+
<div id="method-M000222" class="method-detail">
|
167
|
+
<a name="M000222"></a>
|
165
168
|
|
166
169
|
<div class="method-heading">
|
167
|
-
<a href="#
|
170
|
+
<a href="#M000222" class="method-signature">
|
168
171
|
<span class="method-name">new</span><span class="method-args">(input=nil, properties={})</span>
|
169
172
|
</a>
|
170
173
|
</div>
|
@@ -176,10 +179,10 @@ href="Converter.html">Converter</a> include <a
|
|
176
179
|
href="Generator.html">Generator</a>
|
177
180
|
</p>
|
178
181
|
<p><a class="source-toggle" href="#"
|
179
|
-
onclick="toggleCode('
|
180
|
-
<div class="method-source-code" id="
|
182
|
+
onclick="toggleCode('M000222-source');return false;">[Source]</a></p>
|
183
|
+
<div class="method-source-code" id="M000222-source">
|
181
184
|
<pre>
|
182
|
-
<span class="ruby-comment cmt"># File erubis/engine.rb, line
|
185
|
+
<span class="ruby-comment cmt"># File erubis/engine.rb, line 25</span>
|
183
186
|
<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>={})
|
184
187
|
<span class="ruby-comment cmt">#@input = input</span>
|
185
188
|
<span class="ruby-identifier">init_generator</span>(<span class="ruby-identifier">properties</span>)
|
@@ -194,11 +197,11 @@ href="Generator.html">Generator</a>
|
|
194
197
|
|
195
198
|
<h3 class="section-bar">Public Instance methods</h3>
|
196
199
|
|
197
|
-
<div id="method-
|
198
|
-
<a name="
|
200
|
+
<div id="method-M000223" class="method-detail">
|
201
|
+
<a name="M000223"></a>
|
199
202
|
|
200
203
|
<div class="method-heading">
|
201
|
-
<a href="#
|
204
|
+
<a href="#M000223" class="method-signature">
|
202
205
|
<span class="method-name">convert!</span><span class="method-args">(input)</span>
|
203
206
|
</a>
|
204
207
|
</div>
|
@@ -208,10 +211,10 @@ href="Generator.html">Generator</a>
|
|
208
211
|
convert input string and set it to @src
|
209
212
|
</p>
|
210
213
|
<p><a class="source-toggle" href="#"
|
211
|
-
onclick="toggleCode('
|
212
|
-
<div class="method-source-code" id="
|
214
|
+
onclick="toggleCode('M000223-source');return false;">[Source]</a></p>
|
215
|
+
<div class="method-source-code" id="M000223-source">
|
213
216
|
<pre>
|
214
|
-
<span class="ruby-comment cmt"># File erubis/engine.rb, line
|
217
|
+
<span class="ruby-comment cmt"># File erubis/engine.rb, line 37</span>
|
215
218
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">convert!</span>(<span class="ruby-identifier">input</span>)
|
216
219
|
<span class="ruby-ivar">@src</span> = <span class="ruby-identifier">convert</span>(<span class="ruby-identifier">input</span>)
|
217
220
|
<span class="ruby-keyword kw">end</span>
|
@@ -220,11 +223,11 @@ convert input string and set it to @src
|
|
220
223
|
</div>
|
221
224
|
</div>
|
222
225
|
|
223
|
-
<div id="method-
|
224
|
-
<a name="
|
226
|
+
<div id="method-M000225" class="method-detail">
|
227
|
+
<a name="M000225"></a>
|
225
228
|
|
226
229
|
<div class="method-heading">
|
227
|
-
<a href="#
|
230
|
+
<a href="#M000225" class="method-signature">
|
228
231
|
<span class="method-name">process</span><span class="method-args">(input, context=nil, filename=nil)</span>
|
229
232
|
</a>
|
230
233
|
</div>
|
@@ -235,10 +238,10 @@ helper method to convert and evaluate input text with context object.
|
|
235
238
|
context may be Binding, Hash, or Object.
|
236
239
|
</p>
|
237
240
|
<p><a class="source-toggle" href="#"
|
238
|
-
onclick="toggleCode('
|
239
|
-
<div class="method-source-code" id="
|
241
|
+
onclick="toggleCode('M000225-source');return false;">[Source]</a></p>
|
242
|
+
<div class="method-source-code" id="M000225-source">
|
240
243
|
<pre>
|
241
|
-
<span class="ruby-comment cmt"># File erubis/engine.rb, line
|
244
|
+
<span class="ruby-comment cmt"># File erubis/engine.rb, line 72</span>
|
242
245
|
<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>)
|
243
246
|
<span class="ruby-identifier">code</span> = <span class="ruby-identifier">convert</span>(<span class="ruby-identifier">input</span>)
|
244
247
|
<span class="ruby-identifier">filename</span> <span class="ruby-operator">||=</span> <span class="ruby-value str">'(erubis)'</span>
|
@@ -254,11 +257,11 @@ context may be Binding, Hash, or Object.
|
|
254
257
|
</div>
|
255
258
|
</div>
|
256
259
|
|
257
|
-
<div id="method-
|
258
|
-
<a name="
|
260
|
+
<div id="method-M000226" class="method-detail">
|
261
|
+
<a name="M000226"></a>
|
259
262
|
|
260
263
|
<div class="method-heading">
|
261
|
-
<a href="#
|
264
|
+
<a href="#M000226" class="method-signature">
|
262
265
|
<span class="method-name">process_proc</span><span class="method-args">(proc_obj, context=nil, filename=nil)</span>
|
263
266
|
</a>
|
264
267
|
</div>
|
@@ -269,10 +272,10 @@ helper method evaluate Proc object with contect object. context may be
|
|
269
272
|
Binding, Hash, or Object.
|
270
273
|
</p>
|
271
274
|
<p><a class="source-toggle" href="#"
|
272
|
-
onclick="toggleCode('
|
273
|
-
<div class="method-source-code" id="
|
275
|
+
onclick="toggleCode('M000226-source');return false;">[Source]</a></p>
|
276
|
+
<div class="method-source-code" id="M000226-source">
|
274
277
|
<pre>
|
275
|
-
<span class="ruby-comment cmt"># File erubis/engine.rb, line
|
278
|
+
<span class="ruby-comment cmt"># File erubis/engine.rb, line 88</span>
|
276
279
|
<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>)
|
277
280
|
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">context</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Binding</span>)
|
278
281
|
<span class="ruby-identifier">filename</span> <span class="ruby-operator">||=</span> <span class="ruby-value str">'(erubis)'</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="#
|
94
|
-
<a href="#
|
93
|
+
<a href="#M000179">add_postamble</a>
|
94
|
+
<a href="#M000178">add_preamble</a>
|
95
95
|
</div>
|
96
96
|
</div>
|
97
97
|
|
@@ -113,47 +113,47 @@ 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-
|
117
|
-
<a name="
|
116
|
+
<div id="method-M000179" class="method-detail">
|
117
|
+
<a name="M000179"></a>
|
118
118
|
|
119
119
|
<div class="method-heading">
|
120
|
-
<a href="#
|
120
|
+
<a href="#M000179" 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('
|
128
|
-
<div class="method-source-code" id="
|
127
|
+
onclick="toggleCode('M000179-source');return false;">[Source]</a></p>
|
128
|
+
<div class="method-source-code" id="M000179-source">
|
129
129
|
<pre>
|
130
|
-
<span class="ruby-comment cmt"># File erubis/enhancer.rb, line
|
130
|
+
<span class="ruby-comment cmt"># File erubis/enhancer.rb, line 260</span>
|
131
131
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">add_postamble</span>(<span class="ruby-identifier">src</span>)
|
132
132
|
<span class="ruby-identifier">src</span> <span class="ruby-operator"><<</span> <span class="ruby-value str">"\n"</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">src</span>[<span class="ruby-value">-1</span>] <span class="ruby-operator">==</span> <span class="ruby-value">?\n</span>
|
133
|
-
<span class="ruby-identifier">src</span> <span class="ruby-operator"><<</span> <span class="ruby-
|
133
|
+
<span class="ruby-identifier">src</span> <span class="ruby-operator"><<</span> <span class="ruby-node">"#{@bufvar}.to_s\n"</span>
|
134
134
|
<span class="ruby-keyword kw">end</span>
|
135
135
|
</pre>
|
136
136
|
</div>
|
137
137
|
</div>
|
138
138
|
</div>
|
139
139
|
|
140
|
-
<div id="method-
|
141
|
-
<a name="
|
140
|
+
<div id="method-M000178" class="method-detail">
|
141
|
+
<a name="M000178"></a>
|
142
142
|
|
143
143
|
<div class="method-heading">
|
144
|
-
<a href="#
|
144
|
+
<a href="#M000178" 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('
|
152
|
-
<div class="method-source-code" id="
|
151
|
+
onclick="toggleCode('M000178-source');return false;">[Source]</a></p>
|
152
|
+
<div class="method-source-code" id="M000178-source">
|
153
153
|
<pre>
|
154
|
-
<span class="ruby-comment cmt"># File erubis/enhancer.rb, line
|
154
|
+
<span class="ruby-comment cmt"># File erubis/enhancer.rb, line 256</span>
|
155
155
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">add_preamble</span>(<span class="ruby-identifier">src</span>)
|
156
|
-
<span class="ruby-identifier">src</span> <span class="ruby-operator"><<</span> <span class="ruby-
|
156
|
+
<span class="ruby-identifier">src</span> <span class="ruby-operator"><<</span> <span class="ruby-node">"_erbout = #{@bufvar} = '';"</span>
|
157
157
|
<span class="ruby-keyword kw">end</span>
|
158
158
|
</pre>
|
159
159
|
</div>
|
@@ -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="#
|
101
|
+
<a href="#M000185">add_expr</a>
|
102
102
|
</div>
|
103
103
|
</div>
|
104
104
|
|
@@ -120,21 +120,21 @@ 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-
|
124
|
-
<a name="
|
123
|
+
<div id="method-M000185" class="method-detail">
|
124
|
+
<a name="M000185"></a>
|
125
125
|
|
126
126
|
<div class="method-heading">
|
127
|
-
<a href="#
|
127
|
+
<a href="#M000185" 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('
|
135
|
-
<div class="method-source-code" id="
|
134
|
+
onclick="toggleCode('M000185-source');return false;">[Source]</a></p>
|
135
|
+
<div class="method-source-code" id="M000185-source">
|
136
136
|
<pre>
|
137
|
-
<span class="ruby-comment cmt"># File erubis/enhancer.rb, line
|
137
|
+
<span class="ruby-comment cmt"># File erubis/enhancer.rb, line 37</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
139
|
<span class="ruby-keyword kw">case</span> <span class="ruby-identifier">indicator</span>
|
140
140
|
<span class="ruby-keyword kw">when</span> <span class="ruby-value str">'='</span>
|
@@ -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::EscapedEcpp</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::EscapedEcpp</td>
|
54
|
+
</tr>
|
55
|
+
<tr class="top-aligned-row">
|
56
|
+
<td><strong>In:</strong></td>
|
57
|
+
<td>
|
58
|
+
<a href="../../files/erubis/engine/ecpp_rb.html">
|
59
|
+
erubis/engine/ecpp.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="Ecpp.html">
|
69
|
+
Ecpp
|
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="EscapeEnhancer.html">EscapeEnhancer</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>
|