instance method
<<
Ruby on Rails 2.3.18
Since v2.2.3 Last seen in v2.3.18Available in: v2.2.3 v2.3.18
Signature
<<(text)
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.
Parameters
-
textreq
Source
# File activesupport/lib/active_support/vendor/builder-2.1.2/builder/xmlbase.rb, line 97
def <<(text)
_text(text)
end
Defined in activesupport/lib/active_support/vendor/builder-2.1.2/builder/xmlbase.rb line 97
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in Builder::XmlBase