Sha256: 16214126b351807d813e9df4bd5d5500fb2b88d07bb499d1cfd327e494871e2b
Contents?: true
Size: 748 Bytes
Versions: 1
Compression:
Stored size: 748 Bytes
Contents
module Hanami module Helpers module HtmlHelper # Text node. Allows for text to be inserted between HTML tags. # # @since 0.2.5 # @api private class TextNode # Initialize a new text node # # @param content [String,#to_s] The content to be added. # # @return [Hanami::Helpers::HtmlHelper::TextNode] # # @since 0.2.5 # @api private def initialize(content) @content = content.to_s end # Resolve and return the output # # @return [String] the output # # @since 0.2.5 # @api private def to_s Utils::Escape.html(@content) end end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
hanami-helpers-0.3.0 | lib/hanami/helpers/html_helper/text_node.rb |