Command
Abstract base class for command that reads .yardopts file
@abstract @since 0.8.3
The configuration filename to load extra options from
The options file name (defaults to {DEFAULT_YARDOPTS_FILE}) @return [String] the filename to load extra options from
Parses commandline arguments @param [Array<String>] args the list of arguments @return [Boolean] whether or not arguments are valid @since 0.5.6
# File lib/yard/cli/yardopts_command.rb, line 35 def parse_arguments(*args) parse_yardopts_options(*args) # Parse files and then command line arguments parse_rdoc_document_file parse_yardopts optparse(*args) end
Adds --[no-]yardopts / --[no-]document
# File lib/yard/cli/yardopts_command.rb, line 47 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
Generated with the Darkfish Rdoc Generator 2.