On this page
class · Ruby 4.0
Prism::ClassNode
Represents a class declaration involving the class keyword.
class Foo end ^^^^^^^^^^^^^
Class methods 2
Instance methods 19
#===
#accept
#child_nodes
#class_keyword
#class_keyword_loc
#comment_targets
#compact_child_nodes
#copy
#deconstruct
#deconstruct_keys
#end_keyword
#end_keyword_loc
#inheritance_operator
#inheritance_operator_loc
#inspect
#save_class_keyword_loc
#save_end_keyword_loc
#save_inheritance_operator_loc
#type
Attributes
Read
Represents the body of the class.
class Foo foo ^^^
Read
attr_reader constant_path: ConstantReadNode | ConstantPathNode | CallNode
Read
The name of the class.
Example
class Foo end # name `:Foo`
Read
Represents the superclass of the class.
class Foo < Bar
^^^