Class: SXRB::TextNode

Inherits:
Node
  • Object
show all
Defined in:
lib/sxrb/text_node.rb

Instance Attribute Summary

Attributes inherited from Node

#attributes, #children, #name, #namespaces, #parent, #prefix, #uri

Instance Method Summary collapse

Methods inherited from Node

#append

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

#textObject


11
12
13
# File 'lib/sxrb/text_node.rb', line 11

def text
  @text
end