Append text to the output target without escaping any markup. May be used
within the markup brackets as:
builder.p { |x| x << "<br/>HI" } #=> <p><br/>HI</p>
This is useful when using non-builder enabled software that generates
strings. Just insert the string directly into the builder without changing
the inserted markup.
It is also useful for stacking builder objects. Builders only use
<< to append to the target, so by supporting this
method/operation builders can use other builders as their targets.
Sourcecode
# File /Users/nshb/svn/svn.inimit.com/railsmanual.com/www/trunk/src/rails-2.0.1/activesupport/lib/active_support/vendor/builder-2.1.2/builder/xmlbase.rb, line 97def <<(text)_text(text)end
Append text to the output target without escaping any markup. May be used within the markup brackets as:
builder.p { |x| x << "<br/>HI" } #=> <p><br/>HI</p>This is useful when using non-builder enabled software that generates strings. Just insert the string directly into the builder without changing the inserted markup.
It is also useful for stacking builder objects. Builders only use << to append to the target, so by supporting this method/operation builders can use other builders as their targets.