Class: Refract::AliasGlobalVariableNode

Inherits:
Node
  • Object
show all
Defined in:
lib/refract/nodes/alias_global_variable_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, new_name:, old_name:) ⇒ AliasGlobalVariableNode

Returns a new instance of AliasGlobalVariableNode.



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

def initialize(prism_node: nil, new_name:, old_name:)
	@prism_node = prism_node => Prism::Node | nil
	@new_name = new_name => GlobalVariableReadNode
	@old_name = old_name => GlobalVariableReadNode
	freeze
end

Instance Attribute Details

#new_nameObject

Returns the value of attribute new_name.



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

def new_name
  @new_name
end

#old_nameObject

Returns the value of attribute old_name.



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

def old_name
  @old_name
end