Skip to content
On this page

Maintenance Ruby 3.4 gets fixes, but no new features. Switch to Ruby 4.0 →

class · Ruby 3.4

Prism::ConstantPathNode

< Prism::Node 18 instance methods 2 class methods

Represents accessing a constant through a path of :: operators.

Foo::Bar
^^^^^^^^

Class methods 2

Instance methods 18

Attributes
Read

The name of the constant being accessed. This could be nil in the event of a syntax error.

Read

The left-hand node of the path, if present. It can be nil or any [non-void expression](github.com/ruby/prism/blob/main/docs/parsing_rules.md#non-void-expression). It will be nil when the constant lookup is at the root of the module tree.

Foo::Bar
^^^

self::Test
^^^^

a.b::C
^^^