Skip to content

class Crystal::ModuleDef
inherits Crystal::ASTNode

Module definition:

'module' name
  body
'end'

Class methods

.new(name, body = nil, type_vars = nil, splat_index = nil)

View source

Methods

#==(other : self)

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

#accept_children(visitor)

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

#hash(hasher)

#name : Path

View source

#name=(name : Path)

View source

#name_location : Location?

View source

#name_location=(name_location : Location?)

View source

#resolved_type : ModuleType

#resolved_type=(resolved_type : ModuleType)

View source

#resolved_type? : ModuleType?

#splat_index : Int32?

View source

#splat_index=(splat_index : Int32?)

View source

#type_vars : Array(String)?

View source

#type_vars=(type_vars : Array(String)?)

View source

#visibility=(visibility)

View source