diff options
Diffstat (limited to 'doc/users-guide.html')
-rw-r--r-- | doc/users-guide.html | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/doc/users-guide.html b/doc/users-guide.html index 82aaf31..9e9c501 100644 --- a/doc/users-guide.html +++ b/doc/users-guide.html @@ -154,7 +154,7 @@ Erubis now supports Ruby 1.9. <ul> <li><a href="#topics-fasteruby"><code>Erubis::FastEruby</code> Class</a> </li> - <li><a href="#topics-bufname"><code>:bufname</code> Option</a> + <li><a href="#topics-bufvar"><code>:bufvar</code> Option</a> </li> <li><a href="#topics-trimspaces">'<%= =%>' and '<%= -%>'</a> </li> @@ -2717,13 +2717,13 @@ _buf.to_s <br> -<a name="topics-bufname"></a> -<h3 class="section2"><code>:bufname</code> Option</h3> -<p>Since 2.7.0, Erubis supports <code>:bufname</code> option which allows you to change buffer variable name (default '<code>_buf</code>'). +<a name="topics-bufvar"></a> +<h3 class="section2"><code>:bufvar</code> Option</h3> +<p>Since 2.7.0, Erubis supports <code>:bufvar</code> option which allows you to change buffer variable name (default '<code>_buf</code>'). </p> -<a name="bufname-example.rb"></a> +<a name="bufvar-example.rb"></a> <div class="program_caption"> -bufname-example.rb</div> +bufvar-example.rb</div> <pre class="program">require 'erubis' input = File.read('example.eruby') @@ -2731,14 +2731,14 @@ puts "----- default -----" eruby = Erubis::FastEruby.new(input) puts eruby.src -puts "----- with :bufname option -----" -eruby = Erubis::FastEruby.new(input, <strong>:bufname=>'@_out_buf'</strong>) +puts "----- with :bufvar option -----" +eruby = Erubis::FastEruby.new(input, <strong>:bufvar=>'@_out_buf'</strong>) print eruby.src </pre> -<a name="bufname-example.result"></a> +<a name="bufvar-example.result"></a> <div class="terminal_caption"> result</div> -<pre class="terminal">$ ruby bufname-example.rb +<pre class="terminal">$ ruby bufvar-example.rb ----- default ----- _buf = ''; _buf << %Q`<div>\n` for item in list @@ -2747,7 +2747,7 @@ _buf = ''; _buf << %Q`<div>\n` end _buf << %Q`</div>\n` _buf.to_s ------ with :bufname option ----- +----- with :bufvar option ----- <strong>@_out_buf</strong> = ''; <strong>@_out_buf</strong> << %Q`<div>\n` for item in list <strong>@_out_buf</strong> << %Q` <p>#{ item }</p> |