erubis 2.6.6 → 2.7.0
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGES.txt +79 -3
- data/MIT-LICENSE +1 -1
- data/README.txt +2 -2
- data/benchmark/bench.rb +2 -2
- data/bin/erubis +2 -2
- data/contrib/erubis +293 -155
- data/contrib/inline-require +2 -2
- data/doc-api/classes/Erubis.html +10 -1
- data/doc-api/classes/Erubis/ArrayBufferEnhancer.html +12 -12
- data/doc-api/classes/Erubis/ArrayEnhancer.html +14 -14
- data/doc-api/classes/Erubis/Basic/Converter.html +24 -24
- data/doc-api/classes/Erubis/BiPatternEnhancer.html +12 -12
- 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/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 +36 -36
- data/doc-api/classes/Erubis/ErboutEnhancer.html +14 -14
- data/doc-api/classes/Erubis/EscapeEnhancer.html +6 -6
- data/doc-api/classes/Erubis/EscapedEcpp.html +120 -0
- data/doc-api/classes/Erubis/Evaluator.html +19 -19
- data/doc-api/classes/Erubis/Generator.html +60 -60
- data/doc-api/classes/Erubis/HeaderFooterEnhancer.html +14 -14
- data/doc-api/classes/Erubis/Helpers/RailsFormHelper.html +150 -150
- data/doc-api/classes/Erubis/Helpers/RailsHelper.html +49 -49
- data/doc-api/classes/Erubis/Helpers/RailsHelper/TemplateConverter.html +24 -24
- data/doc-api/classes/Erubis/InterpolationEnhancer.html +38 -39
- data/doc-api/classes/Erubis/JavaGenerator.html +60 -60
- data/doc-api/classes/Erubis/JavascriptGenerator.html +66 -66
- data/doc-api/classes/Erubis/Main.html +22 -22
- data/doc-api/classes/Erubis/NoCodeEnhancer.html +30 -30
- data/doc-api/classes/Erubis/NoTextEnhancer.html +6 -6
- 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.html +1 -0
- 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/Ecpp.html +166 -0
- 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 +18 -34
- data/doc-api/classes/Erubis/PerlGenerator.html +54 -54
- data/doc-api/classes/Erubis/PhpGenerator.html +54 -54
- 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 +12 -12
- data/doc-api/classes/Erubis/PreprocessingHelper.html +22 -22
- data/doc-api/classes/Erubis/PrintEnabledEnhancer.html +20 -20
- data/doc-api/classes/Erubis/PrintOutEnhancer.html +33 -33
- data/doc-api/classes/Erubis/RubyEvaluator.html +18 -18
- data/doc-api/classes/Erubis/RubyGenerator.html +59 -58
- data/doc-api/classes/Erubis/SchemeGenerator.html +60 -60
- data/doc-api/classes/Erubis/SimplifyEnhancer.html +7 -7
- data/doc-api/classes/Erubis/StdoutEnhancer.html +13 -13
- data/doc-api/classes/Erubis/StringBufferEnhancer.html +14 -14
- data/doc-api/classes/Erubis/TinyEruby.html +24 -24
- data/doc-api/classes/Erubis/XmlHelper.html +30 -30
- data/doc-api/classes/Kernel.html +155 -0
- data/doc-api/created.rid +1 -1
- data/doc-api/files/README_txt.html +3 -3
- data/doc-api/files/erubis/context_rb.html +1 -1
- data/doc-api/files/erubis/converter_rb.html +3 -3
- data/doc-api/files/erubis/engine/ec_rb.html +1 -1
- 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 +1 -1
- data/doc-api/files/erubis/engine/ephp_rb.html +1 -1
- data/doc-api/files/erubis/engine/eruby_rb.html +2 -2
- data/doc-api/files/erubis/engine/escheme_rb.html +1 -1
- data/doc-api/files/erubis/engine/optimized_rb.html +1 -1
- 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 +1 -1
- data/doc-api/files/erubis/evaluator_rb.html +1 -1
- data/doc-api/files/erubis/generator_rb.html +3 -3
- data/doc-api/files/erubis/helper_rb.html +1 -1
- data/doc-api/files/erubis/helpers/rails_form_helper_rb.html +1 -1
- data/doc-api/files/erubis/helpers/rails_helper_rb.html +1 -1
- data/doc-api/files/erubis/local-setting_rb.html +1 -1
- data/doc-api/files/erubis/main_rb.html +4 -2
- data/doc-api/files/erubis/preprocessing_rb.html +1 -1
- data/doc-api/files/erubis/tiny_rb.html +1 -1
- 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 +7 -0
- data/doc-api/fr_file_index.html +2 -0
- data/doc-api/fr_method_index.html +237 -223
- data/doc/docstyle.css +25 -4
- data/doc/users-guide.html +286 -21
- data/examples/basic/Makefile +7 -2
- data/examples/basic/example.ecpp +33 -0
- data/lib/erubis.rb +4 -3
- data/lib/erubis/context.rb +2 -2
- data/lib/erubis/converter.rb +3 -3
- data/lib/erubis/engine.rb +8 -8
- data/lib/erubis/engine/ec.rb +2 -2
- data/lib/erubis/engine/ecpp.rb +113 -0
- data/lib/erubis/engine/ejava.rb +9 -9
- data/lib/erubis/engine/ejavascript.rb +9 -9
- data/lib/erubis/engine/enhanced.rb +7 -2
- data/lib/erubis/engine/eperl.rb +2 -2
- data/lib/erubis/engine/ephp.rb +2 -2
- data/lib/erubis/engine/eruby.rb +8 -7
- data/lib/erubis/engine/escheme.rb +2 -2
- data/lib/erubis/engine/optimized.rb +2 -2
- data/lib/erubis/enhancer.rb +70 -27
- data/lib/erubis/error.rb +2 -2
- data/lib/erubis/evaluator.rb +2 -2
- data/lib/erubis/generator.rb +3 -3
- data/lib/erubis/helper.rb +2 -2
- data/lib/erubis/helpers/rails_form_helper.rb +2 -2
- data/lib/erubis/helpers/rails_helper.rb +2 -2
- data/lib/erubis/local-setting.rb +2 -2
- data/lib/erubis/main.rb +31 -4
- data/lib/erubis/preprocessing.rb +2 -2
- data/lib/erubis/tiny.rb +2 -2
- data/lib/erubis/util.rb +22 -0
- data/test/assert-text-equal.rb +2 -2
- 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/example.ecpp +30 -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/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/test-engines.rb +58 -2
- data/test/test-enhancers.rb +51 -2
- data/test/test-erubis.rb +14 -10
- data/test/test-index-cgi.rb +191 -0
- data/test/test-main.rb +35 -4
- data/test/test-users-guide.rb +18 -2
- data/test/test.rb +18 -2
- data/test/testutil.rb +22 -7
- metadata +30 -24
@@ -89,7 +89,7 @@ this is language-independent.
|
|
89
89
|
<h3 class="section-bar">Methods</h3>
|
90
90
|
|
91
91
|
<div class="name-list">
|
92
|
-
<a href="#
|
92
|
+
<a href="#M000205">convert_input</a>
|
93
93
|
</div>
|
94
94
|
</div>
|
95
95
|
|
@@ -111,21 +111,21 @@ this is language-independent.
|
|
111
111
|
<div id="methods">
|
112
112
|
<h3 class="section-bar">Public Instance methods</h3>
|
113
113
|
|
114
|
-
<div id="method-
|
115
|
-
<a name="
|
114
|
+
<div id="method-M000205" class="method-detail">
|
115
|
+
<a name="M000205"></a>
|
116
116
|
|
117
117
|
<div class="method-heading">
|
118
|
-
<a href="#
|
118
|
+
<a href="#M000205" class="method-signature">
|
119
119
|
<span class="method-name">convert_input</span><span class="method-args">(src, input)</span>
|
120
120
|
</a>
|
121
121
|
</div>
|
122
122
|
|
123
123
|
<div class="method-description">
|
124
124
|
<p><a class="source-toggle" href="#"
|
125
|
-
onclick="toggleCode('
|
126
|
-
<div class="method-source-code" id="
|
125
|
+
onclick="toggleCode('M000205-source');return false;">[Source]</a></p>
|
126
|
+
<div class="method-source-code" id="M000205-source">
|
127
127
|
<pre>
|
128
|
-
<span class="ruby-comment cmt"># File erubis/enhancer.rb, line
|
128
|
+
<span class="ruby-comment cmt"># File erubis/enhancer.rb, line 622</span>
|
129
129
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">convert_input</span>(<span class="ruby-identifier">src</span>, <span class="ruby-identifier">input</span>)
|
130
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
131
|
<span class="ruby-keyword kw">super</span>(<span class="ruby-identifier">src</span>, <span class="ruby-identifier">input</span>)
|
@@ -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>
|
@@ -136,24 +136,24 @@ properties[:cachename], or filname + ‘cache’ is used as
|
|
136
136
|
default.
|
137
137
|
</p>
|
138
138
|
<p><a class="source-toggle" href="#"
|
139
|
-
onclick="toggleCode('
|
140
|
-
<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">
|
141
141
|
<pre>
|
142
142
|
<span class="ruby-comment cmt"># File erubis/engine.rb, line 48</span>
|
143
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>={})
|
144
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>)
|
145
145
|
<span class="ruby-identifier">properties</span>[<span class="ruby-identifier">:filename</span>] = <span class="ruby-identifier">filename</span>
|
146
|
-
<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>)
|
147
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>)
|
148
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>)
|
149
150
|
<span class="ruby-keyword kw">else</span>
|
150
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> }
|
151
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>)
|
152
|
-
<span class="ruby-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
<span class="ruby-keyword kw">end</span>
|
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>)
|
157
157
|
<span class="ruby-keyword kw">end</span>
|
158
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>
|
159
159
|
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">engine</span>
|
@@ -163,11 +163,11 @@ default.
|
|
163
163
|
</div>
|
164
164
|
</div>
|
165
165
|
|
166
|
-
<div id="method-
|
167
|
-
<a name="
|
166
|
+
<div id="method-M000222" class="method-detail">
|
167
|
+
<a name="M000222"></a>
|
168
168
|
|
169
169
|
<div class="method-heading">
|
170
|
-
<a href="#
|
170
|
+
<a href="#M000222" class="method-signature">
|
171
171
|
<span class="method-name">new</span><span class="method-args">(input=nil, properties={})</span>
|
172
172
|
</a>
|
173
173
|
</div>
|
@@ -179,8 +179,8 @@ href="Converter.html">Converter</a> include <a
|
|
179
179
|
href="Generator.html">Generator</a>
|
180
180
|
</p>
|
181
181
|
<p><a class="source-toggle" href="#"
|
182
|
-
onclick="toggleCode('
|
183
|
-
<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">
|
184
184
|
<pre>
|
185
185
|
<span class="ruby-comment cmt"># File erubis/engine.rb, line 25</span>
|
186
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>={})
|
@@ -197,11 +197,11 @@ href="Generator.html">Generator</a>
|
|
197
197
|
|
198
198
|
<h3 class="section-bar">Public Instance methods</h3>
|
199
199
|
|
200
|
-
<div id="method-
|
201
|
-
<a name="
|
200
|
+
<div id="method-M000223" class="method-detail">
|
201
|
+
<a name="M000223"></a>
|
202
202
|
|
203
203
|
<div class="method-heading">
|
204
|
-
<a href="#
|
204
|
+
<a href="#M000223" class="method-signature">
|
205
205
|
<span class="method-name">convert!</span><span class="method-args">(input)</span>
|
206
206
|
</a>
|
207
207
|
</div>
|
@@ -211,8 +211,8 @@ href="Generator.html">Generator</a>
|
|
211
211
|
convert input string and set it to @src
|
212
212
|
</p>
|
213
213
|
<p><a class="source-toggle" href="#"
|
214
|
-
onclick="toggleCode('
|
215
|
-
<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">
|
216
216
|
<pre>
|
217
217
|
<span class="ruby-comment cmt"># File erubis/engine.rb, line 37</span>
|
218
218
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">convert!</span>(<span class="ruby-identifier">input</span>)
|
@@ -223,11 +223,11 @@ convert input string and set it to @src
|
|
223
223
|
</div>
|
224
224
|
</div>
|
225
225
|
|
226
|
-
<div id="method-
|
227
|
-
<a name="
|
226
|
+
<div id="method-M000225" class="method-detail">
|
227
|
+
<a name="M000225"></a>
|
228
228
|
|
229
229
|
<div class="method-heading">
|
230
|
-
<a href="#
|
230
|
+
<a href="#M000225" class="method-signature">
|
231
231
|
<span class="method-name">process</span><span class="method-args">(input, context=nil, filename=nil)</span>
|
232
232
|
</a>
|
233
233
|
</div>
|
@@ -238,8 +238,8 @@ helper method to convert and evaluate input text with context object.
|
|
238
238
|
context may be Binding, Hash, or Object.
|
239
239
|
</p>
|
240
240
|
<p><a class="source-toggle" href="#"
|
241
|
-
onclick="toggleCode('
|
242
|
-
<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">
|
243
243
|
<pre>
|
244
244
|
<span class="ruby-comment cmt"># File erubis/engine.rb, line 72</span>
|
245
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>)
|
@@ -257,11 +257,11 @@ context may be Binding, Hash, or Object.
|
|
257
257
|
</div>
|
258
258
|
</div>
|
259
259
|
|
260
|
-
<div id="method-
|
261
|
-
<a name="
|
260
|
+
<div id="method-M000226" class="method-detail">
|
261
|
+
<a name="M000226"></a>
|
262
262
|
|
263
263
|
<div class="method-heading">
|
264
|
-
<a href="#
|
264
|
+
<a href="#M000226" class="method-signature">
|
265
265
|
<span class="method-name">process_proc</span><span class="method-args">(proc_obj, context=nil, filename=nil)</span>
|
266
266
|
</a>
|
267
267
|
</div>
|
@@ -272,8 +272,8 @@ helper method evaluate Proc object with contect object. context may be
|
|
272
272
|
Binding, Hash, or Object.
|
273
273
|
</p>
|
274
274
|
<p><a class="source-toggle" href="#"
|
275
|
-
onclick="toggleCode('
|
276
|
-
<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">
|
277
277
|
<pre>
|
278
278
|
<span class="ruby-comment cmt"># File erubis/engine.rb, line 88</span>
|
279
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>)
|
@@ -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
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
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,19 +120,19 @@ this is language-indenedent.
|
|
120
120
|
<div id="methods">
|
121
121
|
<h3 class="section-bar">Public Instance methods</h3>
|
122
122
|
|
123
|
-
<div id="method-
|
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
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>)
|
@@ -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>
|