Class: Lotus::Helpers::HtmlHelper::TextNode Private
- Inherits:
-
Object
- Object
- Lotus::Helpers::HtmlHelper::TextNode
- Defined in:
- lib/lotus/helpers/html_helper/text_node.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Text node. Allows for text to be inserted between HTML tags.
Instance Method Summary collapse
-
#initialize(content) ⇒ Lotus::Helpers::HtmlHelper::TextNode
constructor
private
Initialize a new text node.
-
#to_s ⇒ String
private
Resolve and return the output.
Constructor Details
#initialize(content) ⇒ Lotus::Helpers::HtmlHelper::TextNode
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Initialize a new text node
17 18 19 |
# File 'lib/lotus/helpers/html_helper/text_node.rb', line 17 def initialize(content) @content = content.to_s end |
Instance Method Details
#to_s ⇒ String
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Resolve and return the output
27 28 29 |
# File 'lib/lotus/helpers/html_helper/text_node.rb', line 27 def to_s Utils::Escape.html(@content) end |