Method: YARD::CLI::YardoptsCommand#yardopts_options

Defined in:
lib/yard/cli/yardopts_command.rb

#yardopts_options(opts) ⇒ Object (protected)

Adds –[no-]yardopts / –[no-]document

Since:

  • 0.8.3



48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
# File 'lib/yard/cli/yardopts_command.rb', line 48

def yardopts_options(opts)
  opts.on('--[no-]yardopts [FILE]',
          "If arguments should be read from FILE",
          "  (defaults to yes, FILE defaults to .yardopts)") do |use_yardopts|
    if use_yardopts.is_a?(String)
      self.options_file = use_yardopts
      self.use_yardopts_file = true
    else
      self.use_yardopts_file = (use_yardopts != false)
    end
  end

  opts.on('--[no-]document', "If arguments should be read from .document file. ",
                             "  (defaults to yes)") do |use_document|
    self.use_document_file = use_document
  end
end