Class: YARDSorbet::Handlers::MixesInClassMethodsHandler

Inherits:
YARD::Handlers::Ruby::Base
  • Object
show all
Extended by:
T::Sig
Defined in:
lib/yard-sorbet/handlers/mixes_in_class_methods_handler.rb

Overview

Tracks modules that invoke mixes_in_class_methods for use in IncludeHandler

Constant Summary collapse

@@mix_in_class_methods =

rubocop:disable Style/ClassVars

T.let({}, T::Hash[String, String])

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.mixed_in_class_methods(code_obj) ⇒ String?

Parameters:

  • code_obj (String)

Returns:

  • (String, nil)


18
19
20
# File 'lib/yard-sorbet/handlers/mixes_in_class_methods_handler.rb', line 18

def self.mixed_in_class_methods(code_obj)
  @@mix_in_class_methods[code_obj]
end

Instance Method Details

#processvoid

This method returns an undefined value.



23
24
25
# File 'lib/yard-sorbet/handlers/mixes_in_class_methods_handler.rb', line 23

def process
  @@mix_in_class_methods[namespace.to_s] = statement.parameters(false)[0].source
end