Class: Cadenza::TextRenderer
- Inherits:
-
BaseRenderer
- Object
- BaseRenderer
- Cadenza::TextRenderer
- Defined in:
- lib/cadenza/text_renderer.rb
Overview
The TextRenderer is the standard rendering logic for Cadenza. It will render an AST according to the rules specified in the Cadenza manual. See the manual for details.
Instance Attribute Summary
Attributes inherited from BaseRenderer
Class Method Summary collapse
-
.render(document_node, context) ⇒ Object
Renders the document given with the given context directly to a string returns.
Methods inherited from BaseRenderer
Constructor Details
This class inherits a constructor from Cadenza::BaseRenderer
Class Method Details
.render(document_node, context) ⇒ Object
Renders the document given with the given context directly to a string returns.
13 14 15 16 17 |
# File 'lib/cadenza/text_renderer.rb', line 13 def self.render(document_node, context) io = StringIO.new new(io).render(document_node, context) io.string end |