Class: LitmusPaper::CLI::Admin::Command

Inherits:
Object
  • Object
show all
Defined in:
lib/litmus_paper/cli/admin/command.rb

Direct Known Subclasses

Force, List, Status

Class Method Summary collapse

Class Method Details

._default_optionsObject



5
6
7
# File 'lib/litmus_paper/cli/admin/command.rb', line 5

def self._default_options
  options = { :litmus_config => "/etc/litmus.conf" }
end

._extend_default_parser(options, &block) ⇒ Object



9
10
11
12
13
14
15
16
17
18
# File 'lib/litmus_paper/cli/admin/command.rb', line 9

def self._extend_default_parser(options, &block)
  OptionParser.new do |opts|
    block.call(opts)

    opts.on("-c", "--config=file", String, "Litmus configuration file", "Default: /etc/litmus.conf") do |config|
      options[:litmus_config] = config
    end
    opts.on("--help", "Show this help message.") { puts opts; exit }
  end
end