class

Syntax::ClassDef

Inherits Syntax::ASTNode < Reference < Object

Class definition:

'class' name [ '<' superclass ]
  body
'end'

Constructors

new(name : Syntax::Path, body = nil, superclass : Syntax::ASTNode | Nil = nil, type_vars : Nil | Array(String) = nil, abstract __arg39 : Bool = false, struct __arg40 : Bool = false, splat_index : Int32 | Nil = nil)
Source

Instance methods

==(other : self)

Returns true if this reference is the same as other. Invokes same?.

abstract=(abstract __arg0 : Bool)
Source
abstract?
Source
accept_children(visitor)
Source
body
Source
body=(body : ASTNode)
Source
clone_without_location
Source
doc

Returns the doc comment attached to this node. Not every node supports having doc comments, so by default this returns nil.

Source
doc=(doc : String | Nil)
Source
hash(hasher)

See Object#hash(hasher)

name
Source
name=(name : Path)
Source
name_location
Source
name_location=(name_location : Location | Nil)
Source
splat_index
Source
splat_index=(splat_index : Int32 | Nil)
Source
struct=(struct __arg0 : Bool)
Source
struct?
Source
superclass
Source
superclass=(superclass : ASTNode | Nil)
Source
type_vars
Source
type_vars=(type_vars : Array(String) | Nil)
Source
visibility
Source
visibility=(visibility : Syntax::Visibility)
Source