doc-api/classes/Erubis/Eperl.html in erubis-2.0.0 vs doc-api/classes/Erubis/Eperl.html in erubis-2.0.1

- old
+ new

@@ -92,19 +92,20 @@ <div id="method-list"> <h3 class="section-bar">Methods</h3> <div class="name-list"> - <a href="#M000094">add_expr_debug</a>&nbsp;&nbsp; - <a href="#M000093">add_expr_escaped</a>&nbsp;&nbsp; - <a href="#M000092">add_expr_literal</a>&nbsp;&nbsp; - <a href="#M000096">add_postamble</a>&nbsp;&nbsp; - <a href="#M000089">add_preamble</a>&nbsp;&nbsp; - <a href="#M000095">add_stmt</a>&nbsp;&nbsp; - <a href="#M000091">add_text</a>&nbsp;&nbsp; - <a href="#M000090">escape_text</a>&nbsp;&nbsp; - <a href="#M000088">new</a>&nbsp;&nbsp; + <a href="#M000099">add_expr_debug</a>&nbsp;&nbsp; + <a href="#M000098">add_expr_escaped</a>&nbsp;&nbsp; + <a href="#M000097">add_expr_literal</a>&nbsp;&nbsp; + <a href="#M000101">add_postamble</a>&nbsp;&nbsp; + <a href="#M000093">add_preamble</a>&nbsp;&nbsp; + <a href="#M000100">add_stmt</a>&nbsp;&nbsp; + <a href="#M000095">add_text</a>&nbsp;&nbsp; + <a href="#M000094">escape_text</a>&nbsp;&nbsp; + <a href="#M000096">escaped_expr</a>&nbsp;&nbsp; + <a href="#M000092">new</a>&nbsp;&nbsp; </div> </div> </div> @@ -122,23 +123,23 @@ <!-- if method_list --> <div id="methods"> <h3 class="section-bar">Public Class methods</h3> - <div id="method-M000088" class="method-detail"> - <a name="M000088"></a> + <div id="method-M000092" class="method-detail"> + <a name="M000092"></a> <div class="method-heading"> - <a href="#M000088" class="method-signature"> + <a href="#M000092" class="method-signature"> <span class="method-name">new</span><span class="method-args">(input, properties={})</span> </a> </div> <div class="method-description"> <p><a class="source-toggle" href="#" - onclick="toggleCode('M000088-source');return false;">[Source]</a></p> - <div class="method-source-code" id="M000088-source"> + onclick="toggleCode('M000092-source');return false;">[Source]</a></p> + <div class="method-source-code" id="M000092-source"> <pre> <span class="ruby-comment cmt"># File erubis/engine/eperl.rb, line 25</span> <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>={}) <span class="ruby-ivar">@func</span> = <span class="ruby-identifier">properties</span>[<span class="ruby-identifier">:func</span>] <span class="ruby-operator">||</span> <span class="ruby-value str">'print'</span> <span class="ruby-keyword kw">super</span> @@ -148,188 +149,213 @@ </div> </div> <h3 class="section-bar">Public Instance methods</h3> - <div id="method-M000094" class="method-detail"> - <a name="M000094"></a> + <div id="method-M000099" class="method-detail"> + <a name="M000099"></a> <div class="method-heading"> - <a href="#M000094" class="method-signature"> + <a href="#M000099" class="method-signature"> <span class="method-name">add_expr_debug</span><span class="method-args">(src, code)</span> </a> </div> <div class="method-description"> <p><a class="source-toggle" href="#" - onclick="toggleCode('M000094-source');return false;">[Source]</a></p> - <div class="method-source-code" id="M000094-source"> + onclick="toggleCode('M000099-source');return false;">[Source]</a></p> + <div class="method-source-code" id="M000099-source"> <pre> -<span class="ruby-comment cmt"># File erubis/engine/eperl.rb, line 56</span> +<span class="ruby-comment cmt"># File erubis/engine/eperl.rb, line 55</span> <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">add_expr_debug</span>(<span class="ruby-identifier">src</span>, <span class="ruby-identifier">code</span>) <span class="ruby-identifier">code</span>.<span class="ruby-identifier">strip!</span> <span class="ruby-identifier">s</span> = <span class="ruby-identifier">code</span>.<span class="ruby-identifier">gsub</span>(<span class="ruby-regexp re">/\'/</span>, <span class="ruby-value str">&quot;\\'&quot;</span>) <span class="ruby-identifier">src</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-ivar">@func</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-node">&quot;('*** debug: #{code}=', #{code}, \&quot;\\n\&quot;);&quot;</span> <span class="ruby-keyword kw">end</span> </pre> </div> </div> </div> - <div id="method-M000093" class="method-detail"> - <a name="M000093"></a> + <div id="method-M000098" class="method-detail"> + <a name="M000098"></a> <div class="method-heading"> - <a href="#M000093" class="method-signature"> + <a href="#M000098" class="method-signature"> <span class="method-name">add_expr_escaped</span><span class="method-args">(src, code)</span> </a> </div> <div class="method-description"> <p><a class="source-toggle" href="#" - onclick="toggleCode('M000093-source');return false;">[Source]</a></p> - <div class="method-source-code" id="M000093-source"> + onclick="toggleCode('M000098-source');return false;">[Source]</a></p> + <div class="method-source-code" id="M000098-source"> <pre> -<span class="ruby-comment cmt"># File erubis/engine/eperl.rb, line 52</span> +<span class="ruby-comment cmt"># File erubis/engine/eperl.rb, line 51</span> <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">add_expr_escaped</span>(<span class="ruby-identifier">src</span>, <span class="ruby-identifier">code</span>) <span class="ruby-identifier">src</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-ivar">@func</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-value str">&quot;(&quot;</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">escaped_expr</span>(<span class="ruby-identifier">code</span>) <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-value str">&quot;); &quot;</span> <span class="ruby-keyword kw">end</span> </pre> </div> </div> </div> - <div id="method-M000092" class="method-detail"> - <a name="M000092"></a> + <div id="method-M000097" class="method-detail"> + <a name="M000097"></a> <div class="method-heading"> - <a href="#M000092" class="method-signature"> + <a href="#M000097" class="method-signature"> <span class="method-name">add_expr_literal</span><span class="method-args">(src, code)</span> </a> </div> <div class="method-description"> <p><a class="source-toggle" href="#" - onclick="toggleCode('M000092-source');return false;">[Source]</a></p> - <div class="method-source-code" id="M000092-source"> + onclick="toggleCode('M000097-source');return false;">[Source]</a></p> + <div class="method-source-code" id="M000097-source"> <pre> -<span class="ruby-comment cmt"># File erubis/engine/eperl.rb, line 48</span> +<span class="ruby-comment cmt"># File erubis/engine/eperl.rb, line 47</span> <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">add_expr_literal</span>(<span class="ruby-identifier">src</span>, <span class="ruby-identifier">code</span>) <span class="ruby-identifier">src</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-ivar">@func</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-value str">&quot;(&quot;</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">code</span>.<span class="ruby-identifier">strip</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-value str">&quot;); &quot;</span> <span class="ruby-keyword kw">end</span> </pre> </div> </div> </div> - <div id="method-M000096" class="method-detail"> - <a name="M000096"></a> + <div id="method-M000101" class="method-detail"> + <a name="M000101"></a> <div class="method-heading"> - <a href="#M000096" class="method-signature"> + <a href="#M000101" class="method-signature"> <span class="method-name">add_postamble</span><span class="method-args">(src)</span> </a> </div> <div class="method-description"> <p><a class="source-toggle" href="#" - onclick="toggleCode('M000096-source');return false;">[Source]</a></p> - <div class="method-source-code" id="M000096-source"> + onclick="toggleCode('M000101-source');return false;">[Source]</a></p> + <div class="method-source-code" id="M000101-source"> <pre> -<span class="ruby-comment cmt"># File erubis/engine/eperl.rb, line 66</span> +<span class="ruby-comment cmt"># File erubis/engine/eperl.rb, line 65</span> <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">add_postamble</span>(<span class="ruby-identifier">src</span>) <span class="ruby-identifier">src</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-value str">&quot;\n&quot;</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> <span class="ruby-keyword kw">end</span> </pre> </div> </div> </div> - <div id="method-M000089" class="method-detail"> - <a name="M000089"></a> + <div id="method-M000093" class="method-detail"> + <a name="M000093"></a> <div class="method-heading"> - <a href="#M000089" class="method-signature"> + <a href="#M000093" class="method-signature"> <span class="method-name">add_preamble</span><span class="method-args">(src)</span> </a> </div> <div class="method-description"> <p><a class="source-toggle" href="#" - onclick="toggleCode('M000089-source');return false;">[Source]</a></p> - <div class="method-source-code" id="M000089-source"> + onclick="toggleCode('M000093-source');return false;">[Source]</a></p> + <div class="method-source-code" id="M000093-source"> <pre> <span class="ruby-comment cmt"># File erubis/engine/eperl.rb, line 30</span> <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">add_preamble</span>(<span class="ruby-identifier">src</span>) + <span class="ruby-comment cmt"># empty</span> <span class="ruby-keyword kw">end</span> </pre> </div> </div> </div> - <div id="method-M000095" class="method-detail"> - <a name="M000095"></a> + <div id="method-M000100" class="method-detail"> + <a name="M000100"></a> <div class="method-heading"> - <a href="#M000095" class="method-signature"> + <a href="#M000100" class="method-signature"> <span class="method-name">add_stmt</span><span class="method-args">(src, code)</span> </a> </div> <div class="method-description"> <p><a class="source-toggle" href="#" - onclick="toggleCode('M000095-source');return false;">[Source]</a></p> - <div class="method-source-code" id="M000095-source"> + onclick="toggleCode('M000100-source');return false;">[Source]</a></p> + <div class="method-source-code" id="M000100-source"> <pre> -<span class="ruby-comment cmt"># File erubis/engine/eperl.rb, line 62</span> +<span class="ruby-comment cmt"># File erubis/engine/eperl.rb, line 61</span> <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">add_stmt</span>(<span class="ruby-identifier">src</span>, <span class="ruby-identifier">code</span>) <span class="ruby-identifier">src</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">code</span> <span class="ruby-keyword kw">end</span> </pre> </div> </div> </div> - <div id="method-M000091" class="method-detail"> - <a name="M000091"></a> + <div id="method-M000095" class="method-detail"> + <a name="M000095"></a> <div class="method-heading"> - <a href="#M000091" class="method-signature"> + <a href="#M000095" class="method-signature"> <span class="method-name">add_text</span><span class="method-args">(src, text)</span> </a> </div> <div class="method-description"> <p><a class="source-toggle" href="#" - onclick="toggleCode('M000091-source');return false;">[Source]</a></p> - <div class="method-source-code" id="M000091-source"> + onclick="toggleCode('M000095-source');return false;">[Source]</a></p> + <div class="method-source-code" id="M000095-source"> <pre> -<span class="ruby-comment cmt"># File erubis/engine/eperl.rb, line 37</span> +<span class="ruby-comment cmt"># File erubis/engine/eperl.rb, line 38</span> <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>) <span class="ruby-identifier">src</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-ivar">@func</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-value str">&quot;('&quot;</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">escape_text</span>(<span class="ruby-identifier">text</span>) <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-value str">&quot;'); &quot;</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">text</span>.<span class="ruby-identifier">empty?</span> <span class="ruby-keyword kw">end</span> </pre> </div> </div> </div> - <div id="method-M000090" class="method-detail"> - <a name="M000090"></a> + <div id="method-M000094" class="method-detail"> + <a name="M000094"></a> <div class="method-heading"> - <a href="#M000090" class="method-signature"> + <a href="#M000094" class="method-signature"> <span class="method-name">escape_text</span><span class="method-args">(text)</span> </a> </div> <div class="method-description"> <p><a class="source-toggle" href="#" - onclick="toggleCode('M000090-source');return false;">[Source]</a></p> - <div class="method-source-code" id="M000090-source"> + onclick="toggleCode('M000094-source');return false;">[Source]</a></p> + <div class="method-source-code" id="M000094-source"> <pre> -<span class="ruby-comment cmt"># File erubis/engine/eperl.rb, line 33</span> +<span class="ruby-comment cmt"># File erubis/engine/eperl.rb, line 34</span> <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">escape_text</span>(<span class="ruby-identifier">text</span>) <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">text</span>.<span class="ruby-identifier">gsub!</span>(<span class="ruby-regexp re">/['\\]/</span>, <span class="ruby-value str">'\\\\\&amp;'</span>) <span class="ruby-operator">||</span> <span class="ruby-identifier">text</span> + <span class="ruby-keyword kw">end</span> +</pre> + </div> + </div> + </div> + + <div id="method-M000096" class="method-detail"> + <a name="M000096"></a> + + <div class="method-heading"> + <a href="#M000096" class="method-signature"> + <span class="method-name">escaped_expr</span><span class="method-args">(code)</span> + </a> + </div> + + <div class="method-description"> + <p><a class="source-toggle" href="#" + onclick="toggleCode('M000096-source');return false;">[Source]</a></p> + <div class="method-source-code" id="M000096-source"> +<pre> +<span class="ruby-comment cmt"># File erubis/engine/eperl.rb, line 42</span> + <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">escaped_expr</span>(<span class="ruby-identifier">code</span>) + <span class="ruby-ivar">@escape</span> <span class="ruby-operator">||=</span> <span class="ruby-value str">'escape'</span> + <span class="ruby-keyword kw">return</span> <span class="ruby-node">&quot;escape(#{code.strip})&quot;</span> <span class="ruby-keyword kw">end</span> </pre> </div> </div> </div> \ No newline at end of file