Class: Refract::AliasGlobalVariableNode
- Defined in:
- lib/refract/nodes/alias_global_variable_node.rb
Instance Attribute Summary collapse
-
#new_name ⇒ Object
Returns the value of attribute new_name.
-
#old_name ⇒ Object
Returns the value of attribute old_name.
Instance Method Summary collapse
-
#initialize(prism_node: nil, new_name:, old_name:) ⇒ AliasGlobalVariableNode
constructor
A new instance of AliasGlobalVariableNode.
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_name ⇒ Object
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_name ⇒ Object
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 |