Class: SXRB::TextNode
Instance Attribute Summary
Attributes inherited from Node
#attributes, #children, #name, #namespaces, #parent, #prefix, #uri
Instance Method Summary collapse
- #append_text(text) ⇒ Object
-
#initialize(text) ⇒ TextNode
constructor
A new instance of TextNode.
- #text ⇒ Object
Methods inherited from Node
Constructor Details
#initialize(text) ⇒ TextNode
Returns a new instance of TextNode.
3 4 5 |
# File 'lib/sxrb/text_node.rb', line 3 def initialize(text) @text = text || "" end |
Instance Method Details
#append_text(text) ⇒ Object
7 8 9 |
# File 'lib/sxrb/text_node.rb', line 7 def append_text(text) @text << text end |
#text ⇒ Object
11 12 13 |
# File 'lib/sxrb/text_node.rb', line 11 def text @text end |