Class: Ruty::Datastructure::TextNode
- Defined in:
- lib/ruty/datastructure.rb
Overview
a node that stores text data
Instance Method Summary collapse
-
#initialize(text) ⇒ TextNode
constructor
A new instance of TextNode.
- #render_node(context, stream) ⇒ Object
Constructor Details
#initialize(text) ⇒ TextNode
Returns a new instance of TextNode.
50 51 52 |
# File 'lib/ruty/datastructure.rb', line 50 def initialize text @text = text end |
Instance Method Details
#render_node(context, stream) ⇒ Object
54 55 56 57 |
# File 'lib/ruty/datastructure.rb', line 54 def render_node context, stream stream << @text nil end |