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

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

Constant Summary collapse

MATCH =
/\A(class|module)\s+([\w|_])+\s*[<|;|\n]?/

Instance Method Summary collapse

Constructor Details

#initialize(*args) ⇒ AppendixHandler

Returns a new instance of AppendixHandler.



12
13
14
15
16
# File 'lib/yard-appendix/handlers/ruby/legacy/appendix_handler.rb', line 12

def initialize(*args)
  super(*args)

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

Instance Method Details

#processObject



18
19
20
21
# File 'lib/yard-appendix/handlers/ruby/legacy/appendix_handler.rb', line 18

def process
  ns = statement.tokens.to_s.split(/\s+/).last
  globals.resolver.register_namespace(ns, namespace)
end