class

Marten::Template::Node::Text

Inherits Marten::Template::Node::Base < Reference < Object

Represents a text node.

A text will simply output its raw content at rendering time.

Constructors

new(source : String)
Source

Instance methods

render(context : Context) : String

Given a Marten::Template::Context object, generates a String output.

Source
without_trailing_whitespace

Returns a copy of the text node with trailing whitespace removed, or nil if the result is empty.

Source