Class: RBS::Dynamic::Builder::Module

Inherits:
Base
  • Object
show all
Defined in:
lib/rbs/dynamic/builder.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(module_) ⇒ Module

Returns a new instance of Module.



144
145
146
147
# File 'lib/rbs/dynamic/builder.rb', line 144

def initialize(module_)
  super()
  @module = module_
end

Instance Attribute Details

#moduleObject (readonly)

Returns the value of attribute module.



142
143
144
# File 'lib/rbs/dynamic/builder.rb', line 142

def module
  @module
end

Instance Method Details

#buildObject



149
150
151
152
153
154
155
156
157
158
159
# File 'lib/rbs/dynamic/builder.rb', line 149

def build
  RBS::AST::Declarations::Module.new(
    name: self.module.name,
    type_params: [],
    self_types: [],
    members: build_members,
    location: nil,
    annotations: [],
    comment: nil
  )
end