Sha256: eda9d7cd28650c125f708d87c9889ea4bd265d5df59987b714cc60ba38377845
Contents?: true
Size: 779 Bytes
Versions: 26
Compression:
Stored size: 779 Bytes
Contents
require 'hanami/utils/escape' 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
26 entries across 26 versions & 1 rubygems