summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormakoto kuwata <kwa@kuwata-lab.com>2011-03-21 20:47:08 +0900
committermakoto kuwata <kwa@kuwata-lab.com>2011-03-21 20:47:08 +0900
commit772b3fc6b3b97379ae3dd4116c6038f6a53b9251 (patch)
tree585ad4d20cb311cb88584a4ea42624ebbe10f135
parentcd532bfac8127d5526c5d30f5e1d55ff6ff09b1d (diff)
downloaderubis-772b3fc6b3b97379ae3dd4116c6038f6a53b9251.tar.gz
[update] 'doc/users-guide.{txt,html}'
-rw-r--r--doc/users-guide.html22
-rw-r--r--doc/users-guide.txt18
2 files changed, 20 insertions, 20 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">'&lt;%= =%&gt;' and '&lt;%= -%&gt;'</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=&gt;'@_out_buf'</strong>)
+puts "----- with :bufvar option -----"
+eruby = Erubis::FastEruby.new(input, <strong>:bufvar=&gt;'@_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 &lt;&lt; %Q`&lt;div&gt;\n`
for item in list
@@ -2747,7 +2747,7 @@ _buf = ''; _buf &lt;&lt; %Q`&lt;div&gt;\n`
end
_buf &lt;&lt; %Q`&lt;/div&gt;\n`
_buf.to_s
------ with :bufname option -----
+----- with :bufvar option -----
<strong>@_out_buf</strong> = ''; <strong>@_out_buf</strong> &lt;&lt; %Q`&lt;div&gt;\n`
for item in list
<strong>@_out_buf</strong> &lt;&lt; %Q` &lt;p&gt;#{ item }&lt;/p&gt;
diff --git a/doc/users-guide.txt b/doc/users-guide.txt
index 2e48d2f..85431af 100644
--- a/doc/users-guide.txt
+++ b/doc/users-guide.txt
@@ -2825,12 +2825,12 @@ _buf.to_s
Technically, {{,Erubis::FastEruby,}} is just a subclass of {{,Erubis::Eruby,}} and includes {{,{{<InterpolationEnhancer|#interpolation-enhancer>}},}}. {{,Erubis::FastEruby,}} is faster than {{,Erubis::Eruby,}} but is not extensible compared to {{,Erubis::Eruby,}}. This is the reason why {{,Erubis::FastEruby,}} is not the default class of Erubis.
-.$$ {{,:bufname,}} Option | topics-bufname
+.$$ {{,:bufvar,}} Option | topics-bufvar
-Since 2.7.0, Erubis supports {{,:bufname,}} option which allows you to change buffer variable name (default '{{,_buf,}}').
+Since 2.7.0, Erubis supports {{,:bufvar,}} option which allows you to change buffer variable name (default '{{,_buf,}}').
-.? bufname-example.rb
-.-------------------- bufname-example.rb
+.? bufvar-example.rb
+.-------------------- bufvar-example.rb
require 'erubis'
input = File.read('example.eruby')
@@ -2838,14 +2838,14 @@ puts "----- default -----"
eruby = Erubis::FastEruby.new(input)
puts eruby.src
-puts "----- with :bufname option -----"
-eruby = Erubis::FastEruby.new(input, {{*:bufname=>'@_out_buf'*}})
+puts "----- with :bufvar option -----"
+eruby = Erubis::FastEruby.new(input, {{*:bufvar=>'@_out_buf'*}})
print eruby.src
.--------------------
.? result
-.==================== bufname-example.result
-$ ruby bufname-example.rb
+.==================== bufvar-example.result
+$ ruby bufvar-example.rb
----- default -----
_buf = ''; _buf << %Q`<div>\n`
for item in list
@@ -2854,7 +2854,7 @@ _buf = ''; _buf << %Q`<div>\n`
end
_buf << %Q`</div>\n`
_buf.to_s
------ with :bufname option -----
+----- with :bufvar option -----
{{*@_out_buf*}} = ''; {{*@_out_buf*}} << %Q`<div>\n`
for item in list
{{*@_out_buf*}} << %Q` <p>#{ item }</p>