Class: Canon::Xml::Nodes::TextNode

Inherits:
Canon::Xml::Node show all
Defined in:
lib/canon/xml/nodes/text_node.rb

Overview

Text node in the XPath data model

Instance Attribute Summary collapse

Attributes inherited from Canon::Xml::Node

#children, #parent

Instance Method Summary collapse

Methods inherited from Canon::Xml::Node

#add_child, #in_node_set=, #in_node_set?

Constructor Details

#initialize(value:) ⇒ TextNode

Returns a new instance of TextNode.



12
13
14
15
# File 'lib/canon/xml/nodes/text_node.rb', line 12

def initialize(value:)
  super()
  @value = value
end

Instance Attribute Details

#valueObject (readonly)

Returns the value of attribute value.



10
11
12
# File 'lib/canon/xml/nodes/text_node.rb', line 10

def value
  @value
end

Instance Method Details

#node_typeObject



17
18
19
# File 'lib/canon/xml/nodes/text_node.rb', line 17

def node_type
  :text
end