class YARD::CLI::Gems
def optparse(*args)
def optparse(*args) opts = OptionParser.new opts.banner = 'Usage: yard gems [options] [gem_name [version]]' opts.separator "" opts.separator "#{description}. If no gem_name is given," opts.separator "all gems are built." opts.separator "" opts.on('--rebuild', 'Rebuilds index') do @rebuild = true end common_options(opts) parse_options(opts, args) add_gems(args) if !args.empty? && @gems.empty? log.error "No specified gems could be found for command" elsif @gems.empty? @gems += YARD::GemIndex.all if @gems.empty? end end