Class: Antlers::RootNode

Inherits:
BranchNode show all
Defined in:
lib/nodes/root_node.rb

Constant Summary

Constants inherited from AntlerNode

AntlerNode::DEF_KEY, AntlerNode::END_KEY

Instance Attribute Summary

Attributes inherited from BranchNode

#children

Attributes inherited from AntlerNode

#name

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from BranchNode

#render

Methods inherited from AntlerNode

#==, #end_name, #eql?, #hash, #render

Constructor Details

#initialize(name: :root_node, children: []) ⇒ RootNode

Returns a new instance of RootNode.



7
8
9
# File 'lib/nodes/root_node.rb', line 7

def initialize(name: :root_node, children: [])
  super(name:, children:)
end

Class Method Details

.buildObject



16
17
18
# File 'lib/nodes/root_node.rb', line 16

def build(**)
  new()
end

.match?Boolean

Returns:

  • (Boolean)


12
13
14
# File 'lib/nodes/root_node.rb', line 12

def match?(**)
  false
end