Method: Atom::Tools#atom_options

Defined in:
lib/atom/tools.rb

#atom_options(opts, options) ⇒ Object

set up some common OptionParser settings



120
121
122
123
124
125
126
127
128
# File 'lib/atom/tools.rb', line 120

def atom_options opts, options
  opts.on('-u', '--user NAME', 'username for HTTP auth') { |u| options[:user] = u }

  opts.on_tail('-h', '--help', 'show this usage statement') { |h| puts opts; exit }

  opts.on_tail('-p', '--password [PASSWORD]', 'password for HTTP auth') do |p|
    options[:pass] = p
  end
end