Class: Prism::ConstantPathTargetNode

Inherits:
Node
  • Object
show all
Defined in:
lib/prism/node_ext.rb

Instance Method Summary collapse

Instance Method Details

#full_nameObject

Returns the full name of this constant path. For example: “Foo::Bar”



142
143
144
# File 'lib/prism/node_ext.rb', line 142

def full_name
  full_name_parts.join("::")
end

#full_name_partsObject

Returns the list of parts for the full name of this constant path. For example: [:Foo, :Bar]



137
138
139
# File 'lib/prism/node_ext.rb', line 137

def full_name_parts
  (parent&.full_name_parts || [:""]).push(child.name)
end