Class: YARDSorbet::Handlers::IncludeHandler
- Inherits:
-
YARD::Handlers::Ruby::Base
- Object
- YARD::Handlers::Ruby::Base
- YARDSorbet::Handlers::IncludeHandler
- Extended by:
- T::Sig
- Defined in:
- lib/yard-sorbet/handlers/include_handler.rb
Overview
Extends any modules included via mixes_in_class_methods
Instance Method Summary collapse
-
#included_in ⇒ YARD::CodeObjects::NamespaceObject
private
The namespace object that is including the module.
- #process ⇒ void
Instance Method Details
#included_in ⇒ YARD::CodeObjects::NamespaceObject (private)
Returns the namespace object that is including the module.
28 29 30 |
# File 'lib/yard-sorbet/handlers/include_handler.rb', line 28 def included_in statement.namespace ? YARD::CodeObjects::Proxy.new(namespace, statement.namespace.source) : namespace end |
#process ⇒ void
This method returns an undefined value.
16 17 18 19 20 21 22 |
# File 'lib/yard-sorbet/handlers/include_handler.rb', line 16 def process statement.parameters(false).each do |mixin| obj = YARD::CodeObjects::Proxy.new(namespace, mixin.source) class_methods_namespaces = MixesInClassMethodsHandler.mixed_in_class_methods(obj.to_s) class_methods_namespaces&.each { included_in.mixins(:class) << YARD::CodeObjects::Proxy.new(obj, _1) } end end |