Skip to content

class Crystal::FunDef
inherits Crystal::ASTNode

Class methods

.new(name, args = [] of Arg, return_type = nil, varargs = false, body = nil, real_name = name)

View source

Methods

#==(other : self)

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

#accept_children(visitor)

View source

#args : Array(Arg)

View source

#args=(args : Array(Arg))

View source

#body=(body : ASTNode?)

View source

#clone_without_location

View source

#doc : String?

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

View source

#doc=(doc : String?)

View source

#external : External

#external=(external : External)

View source

#external? : External?

#hash(hasher)

#name=(name : String)

View source

#real_name : String

View source

#real_name=(real_name : String)

View source

#return_type : ASTNode?

View source

#return_type=(return_type : ASTNode?)

View source

#varargs=(varargs : Bool)

View source

#varargs? : Bool

View source