Class: Canon::Xml::Nodes::CommentNode

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

Overview

Comment 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:) ⇒ CommentNode

Returns a new instance of CommentNode.



12
13
14
15
# File 'lib/canon/xml/nodes/comment_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/comment_node.rb', line 10

def value
  @value
end

Instance Method Details

#nameObject



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

def name
  "comment"
end

#node_typeObject



21
22
23
# File 'lib/canon/xml/nodes/comment_node.rb', line 21

def node_type
  :comment
end