class YARD::CLI::LinkStdlib
Top-level {YARD::CLI::Command} for the `yard-link_stdlib` plugin. Added under the name `stdlib` (see {YARD::LinkStdlib.install!}).
Simply a router to the sub-commands. Like {YARD::CLI::CommandParser}, which handles routing for `yard`, but is not really re-usable. In addition, this class handles “-” → “_” conversion in sub-command names, since we have multi-word commands.
Public Class Methods
Public Instance Methods
description()
click to toggle source
run(*args)
click to toggle source
# File lib/yard/cli/link_stdlib.rb, line 70 def run *args # log.level = Logger::INFO target = self.class.commands args = [ 'help' ] if args.empty? while target.is_a? Hash key = args[0].gsub( '-', '_' ).to_sym if target.key? key target = target[key] args.shift else raise "Bad command name: #{ args[0] }" end end target.run( *args ) end