module Solargraph::RbsMap::Conversions

def module_decl_to_pin decl

Returns:
  • (void) -

Parameters:
  • decl (RBS::AST::Declarations::Module) --
def module_decl_to_pin decl
  module_pin = Solargraph::Pin::Namespace.new(
    type: :module,
    name: decl.name.relative!.to_s,
    type_location: location_decl_to_pin_location(decl.location),
    closure: Solargraph::Pin::ROOT_PIN,
    comments: decl.comment&.string,
    generics: decl.type_params.map(&:name).map(&:to_s),
  )
  pins.push module_pin
  convert_self_types_to_pins decl, module_pin
  convert_members_to_pins decl, module_pin
  add_mixins decl, module_pin.closure
end