Class: YARD::Handlers::Ruby::AppendixHandler

Inherits:
CommentHandler
  • Object
show all
Defined in:
lib/yard-appendix/handlers/appendix_handler.rb,
lib/yard-appendix/handlers/ruby/appendix_handler.rb

Overview

Tracks every namespace defining statement and registers it with the NamespaceResolver.

Instance Method Summary collapse

Constructor Details

#initialize(*args) ⇒ AppendixHandler

Returns a new instance of AppendixHandler.



35
36
37
38
39
# File 'lib/yard-appendix/handlers/appendix_handler.rb', line 35

def initialize(*args)
  super(*args)

  globals.resolver ||= YARD::AppendixPlugin::NamespaceResolver.new
end

Instance Method Details

#processObject



41
42
43
# File 'lib/yard-appendix/handlers/appendix_handler.rb', line 41

def process
  globals.resolver.register_namespace(statement, namespace)
end