1- # \ ERB (Embedded Ruby)
1+ # ERB (Embedded Ruby)
22
3- \ ERB is an easy-to-use, but also very powerful, [ template processor] [ template processor ] .
3+ ERB is an easy-to-use, but also very powerful, [ template processor] [ template processor ] .
44
5- \ ERB is commonly used to produce:
5+ ERB is commonly used to produce:
66
77- Customized or personalized email messages.
88- Customized or personalized web pages.
99- Software code (in code-generating applications).
1010
11- Like method [ sprintf] [ sprintf ] , \ ERB can format run-time data into a string.
12- \ ERB, however, is * much more powerful*
11+ Like method [ sprintf] [ sprintf ] , ERB can format run-time data into a string.
12+ ERB, however, is * much more powerful*
1313
14- ## How \ ERB Works
14+ ## How ERB Works
1515
16- Using \ ERB, you can create a * template* : a plain-text string that has specially-formatted * tags* ,
17- then store it into an \ ERB object;
18- when \ ERB produces _ result_ string, it:
16+ Using ERB, you can create a * template* : a plain-text string that has specially-formatted * tags* ,
17+ then store it into an ERB object;
18+ when ERB produces _ result_ string, it:
1919
2020- Inserts run-time-evaluated expressions into the result.
2121- Executes snippets of Ruby code.
@@ -35,7 +35,7 @@ There are three types of tags:
3535| Execution tag | <tt >'<% _ ruby_code_ %>'</tt > | Execute <tt >_ ruby_code_ </tt >. | None. |
3636| Comment tag | <tt >'<%# _ comment_text_ %>'</tt > | None. | None. |
3737
38- These examples use ` erb ` , the \ ERB command-line interface;
38+ These examples use ` erb ` , the ERB command-line interface;
3939each "echoes" a string template and pipes it to ` erb ` as input:
4040
4141
@@ -56,16 +56,16 @@ each "echoes" a string template and pipes it to `erb` as input:
5656 echo "<%# TODO: Fix this nonsense. %> Nonsense." | erb
5757 " Nonsense."
5858
59- ## How to Use \ ERB
59+ ## How to Use ERB
6060
61- You can use \ ERB either:
61+ You can use ERB either:
6262
6363- In a program: see class ERB.
6464- From the command line: see [ ERB Executable] [ erb executable ] .
6565
6666## Installation
6767
68- \ ERB is installed with Ruby, and so there's no further installation needed.
68+ ERB is installed with Ruby, and so there's no further installation needed.
6969
7070## Other Template Engines
7171
@@ -77,7 +77,7 @@ Other popular template engines may be found in the [Ruby Toolbox][ruby toolbox].
7777
7878## Code
7979
80- The \ ERB source code is in GitHub project [ ruby/erb] [ ruby/erb ] /
80+ The ERB source code is in GitHub project [ ruby/erb] [ ruby/erb ] .
8181
8282## Bugs
8383
0 commit comments