class Builder
A builder for rendering Utopia content that extends XRB::Builder with Utopia-specific functionality.
Definitions
def write(string)
Override write to directly append to output
Implementation
def write(string)
@output << string
end
def text(content)
Override text to handle build_markup protocol
Implementation
def text(content)
return unless content
if content.respond_to?(:build_markup)
content.build_markup(self)
else
XRB::Markup.append(@output, content)
end
end
def empty?
Whether this state has any nested tags.
Implementation
def empty?
@tags.empty?
end