Skip to content
On this page
class · Ruby 4.0

Prism::ClassNode

< Prism::Node 19 instance methods 2 class methods

Represents a class declaration involving the class keyword.

class Foo end
^^^^^^^^^^^^^

Class methods 2

Instance methods 19

Attributes
Read

Represents the body of the class.

class Foo
  foo
  ^^^
Read

attr_reader locals: Array[Symbol]

Read

The name of the class.

Example
class Foo end # name `:Foo`
Read

Represents the superclass of the class.

class Foo < Bar
            ^^^