Method: Installer#parse_options

Defined in:
lib/makeconf/installer.rb

#parse_options(opts) ⇒ Object

Parse command line options. Should only be called from Makeconf.parse_options()



58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
# File 'lib/makeconf/installer.rb', line 58

def parse_options(opts)
  opts.separator ""
  opts.separator "Installation options:"

  # Convert symbols to strings
  tmp = {}
  @dir.each { |k,v| tmp[k.to_s] = v }

  tmp.sort.each do |k, v|
     opts.on('--' + k + ' [DIRECTORY]', "TODO describe this [#{v}]") do |arg|
        @dir[k.to_sym] = arg
     end
  end

end