lib-ruby-parser (C++ bindings)  4.0.1+ruby-3.1.1
C++ bindings for lib-ruby-parser library
lib_ruby_parser::Class Class Reference

Represents a class definition (using a class keyword, Class.new is just a method call) More...

#include <nodes.hpp>

Public Attributes

Nodename
 Name of the class, String("Foo") for class Foo; end More...
 
Nodesuperclass
 
Nodebody
 Body of the method, None if there's no body. More...
 
Loc keyword_l
 
MaybeLoc operator_l
 
Loc end_l
 
Loc expression_l
 

Detailed Description

Represents a class definition (using a class keyword, Class.new is just a method call)

Member Data Documentation

◆ body

Node* lib_ruby_parser::Class::body

Body of the method, None if there's no body.

◆ end_l

Loc lib_ruby_parser::Class::end_l

Location of the end keyword.

class Foo; end
^^^

◆ expression_l

Loc lib_ruby_parser::Class::expression_l

Location of the full expression

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

◆ keyword_l

Loc lib_ruby_parser::Class::keyword_l

Location of the class keyword.

class Foo; end
^^^^^

◆ name

Node* lib_ruby_parser::Class::name

Name of the class, String("Foo") for class Foo; end

◆ operator_l

MaybeLoc lib_ruby_parser::Class::operator_l

Location of the < operator

class A < B; end
^

None if there's no explicit superclass given.

◆ superclass

Node* lib_ruby_parser::Class::superclass

Superclass. Can be an expression in cases like class A < (obj.foo + 1); end

None if no explicit superclass given (i.e. class Foo; end)


The documentation for this class was generated from the following file: