Class: Spoom::Model::Namespace

Inherits:
SymbolDef show all
Defined in:
lib/spoom/model/model.rb

Overview

A class or module

Direct Known Subclasses

Class, Module, SingletonClass

Instance Attribute Summary collapse

Attributes inherited from SymbolDef

#comments, #location, #owner, #symbol

Instance Method Summary collapse

Methods inherited from SymbolDef

#full_name, #name

Constructor Details

#initialize(symbol, owner:, location:, comments: []) ⇒ Namespace

: (Symbol symbol, owner: Namespace?, location: Location, ?comments: Array) -> void



122
123
124
125
126
127
# File 'lib/spoom/model/model.rb', line 122

def initialize(symbol, owner:, location:, comments: [])
  super(symbol, owner: owner, location: location, comments: comments)

  @children = T.let([], T::Array[SymbolDef])
  @mixins = T.let([], T::Array[Mixin])
end

Instance Attribute Details

#childrenObject (readonly)

: Array



116
117
118
# File 'lib/spoom/model/model.rb', line 116

def children
  @children
end

#mixinsObject (readonly)

: Array



119
120
121
# File 'lib/spoom/model/model.rb', line 119

def mixins
  @mixins
end