Class: Hanami::Helpers::HtmlHelper::TextNode Private
- Inherits:
-
Object
- Object
- Hanami::Helpers::HtmlHelper::TextNode
- Defined in:
- lib/hanami/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) ⇒ Hanami::Helpers::HtmlHelper::TextNode
constructor
private
Initialize a new text node.
-
#to_s ⇒ String
private
Resolve and return the output.
Constructor Details
#initialize(content) ⇒ Hanami::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
19 20 21 |
# File 'lib/hanami/helpers/html_helper/text_node.rb', line 19 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
29 30 31 |
# File 'lib/hanami/helpers/html_helper/text_node.rb', line 29 def to_s Utils::Escape.html(@content) end |