Class: Refract::ConstantPathNode

Inherits:
Node
  • Object
show all
Defined in:
lib/refract/nodes/constant_path_node.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Node

#accept, #copy, #start_line, #type, type

Constructor Details

#initialize(prism_node: nil, parent: nil, name:) ⇒ ConstantPathNode

Returns a new instance of ConstantPathNode.



5
6
7
8
9
10
# File 'lib/refract/nodes/constant_path_node.rb', line 5

def initialize(prism_node: nil, parent: nil, name:)
	@prism_node = prism_node => Prism::Node | nil
	@parent = parent
	@name = name
	freeze
end

Instance Attribute Details

#nameObject

Returns the value of attribute name.



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

def name
  @name
end

#parentObject

Returns the value of attribute parent.



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

def parent
  @parent
end