mirror of
https://github.com/ruby/ruby.git
synced 2026-01-26 12:14:51 +00:00
[ruby/erb] Fix tag shown in example of ERB expression tag and
execution tag (https://github.com/ruby/erb/pull/92) These were the wrong way around. https://github.com/ruby/erb/commit/50a5cd76fe
This commit is contained in:
parent
d3d2357a6c
commit
7334244e00
@ -60,7 +60,7 @@ require 'erb/util'
|
||||
# \ERB supports tags of three kinds:
|
||||
#
|
||||
# - [Expression tags][expression tags]:
|
||||
# each begins with `'<%'`, ends with `'%>'`; contains a Ruby expression;
|
||||
# each begins with `'<%='`, ends with `'%>'`; contains a Ruby expression;
|
||||
# in the result, the value of the expression replaces the entire tag:
|
||||
#
|
||||
# template = 'The magic word is <%= magic_word %>.'
|
||||
@ -77,7 +77,7 @@ require 'erb/util'
|
||||
# ERB.new('Today is <%= Date::DAYNAMES[Date.today.wday] %>.').result # => "Today is Monday."
|
||||
#
|
||||
# - [Execution tags][execution tags]:
|
||||
# each begins with `'<%='`, ends with `'%>'`; contains Ruby code to be executed:
|
||||
# each begins with `'<%'`, ends with `'%>'`; contains Ruby code to be executed:
|
||||
#
|
||||
# template = '<% File.write("t.txt", "Some stuff.") %>'
|
||||
# ERB.new(template).result
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user