Class: YARD::Handlers::Ruby::Legacy::AppendixHandler
- Inherits:
-
Base
- Object
- Base
- YARD::Handlers::Ruby::Legacy::AppendixHandler
- 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
-
#initialize(*args) ⇒ AppendixHandler
constructor
A new instance of AppendixHandler.
- #process ⇒ Object
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
#process ⇒ Object
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 |