File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change 6060# \ERB supports tags of three kinds:
6161#
6262# - [Expression tags][expression tags]:
63- # each begins with `'<%'`, ends with `'%>'`; contains a Ruby expression;
63+ # each begins with `'<%= '`, ends with `'%>'`; contains a Ruby expression;
6464# in the result, the value of the expression replaces the entire tag:
6565#
6666# template = 'The magic word is <%= magic_word %>.'
7777# ERB.new('Today is <%= Date::DAYNAMES[Date.today.wday] %>.').result # => "Today is Monday."
7878#
7979# - [Execution tags][execution tags]:
80- # each begins with `'<%= '`, ends with `'%>'`; contains Ruby code to be executed:
80+ # each begins with `'<%'`, ends with `'%>'`; contains Ruby code to be executed:
8181#
8282# template = '<% File.write("t.txt", "Some stuff.") %>'
8383# ERB.new(template).result
You can’t perform that action at this time.
0 commit comments