Class: Rucoa::Rbs::ModuleDefinitionMapper

Inherits:
Object
  • Object
show all
Defined in:
lib/rucoa/rbs/module_definition_mapper.rb

Direct Known Subclasses

ClassDefinitionMapper

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(declaration:) ⇒ ModuleDefinitionMapper

Returns a new instance of ModuleDefinitionMapper.

Parameters:

  • declaration (RBS::AST::Declarations::Module)


15
16
17
# File 'lib/rucoa/rbs/module_definition_mapper.rb', line 15

def initialize(declaration:)
  @declaration = declaration
end

Class Method Details

.call(declaration:) ⇒ Rucoa::Definitions::ModuleDefinition

Parameters:

  • declaration (RBS::AST::Declarations::Module)

Returns:



9
10
11
# File 'lib/rucoa/rbs/module_definition_mapper.rb', line 9

def call(declaration:)
  new(declaration: declaration).call
end

Instance Method Details

#callRucoa::Definitions::ModuleDefinition



20
21
22
23
24
25
26
27
28
29
# File 'lib/rucoa/rbs/module_definition_mapper.rb', line 20

def call
  Definitions::ModuleDefinition.new(
    description: description,
    extended_module_qualified_names: extended_module_qualified_names,
    included_module_qualified_names: included_module_qualified_names,
    location: location,
    prepended_module_qualified_names: prepended_module_qualified_names,
    qualified_name: qualified_name
  )
end