Class: DocHealth::CLI

Inherits:
Object
  • Object
show all
Defined in:
lib/doc_health/cli.rb

Class Method Summary collapse

Class Method Details

.optionsObject



7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# File 'lib/doc_health/cli.rb', line 7

def self.options
  options = {}

  OptionParser.new do |opts|
    opts.banner = "Usage: doc-health [options]"

    opts.on("-h", "--help", "Show this help message") do
      exit
    end

    opts.on("-p PATH", "--path=PATH", "Specify the documentation path") do |path|
      options[:path] = path
    end

    opts.on("-csv", "--csv", "Generate CSV report") do
      options[:csv] = true
    end
  end.parse!

  options
end