Method: GLI::AppSupport#parse_config

Defined in:
lib/gli/app_support.rb

#parse_configObject

:nodoc:



106
107
108
109
110
111
112
113
114
115
# File 'lib/gli/app_support.rb', line 106

def parse_config # :nodoc:
  config = {
    'commands' => {},
  }
  if @config_file && File.exist?(@config_file)
    require 'yaml'
    config.merge!(File.open(@config_file) { |file| YAML::load(file) })
  end
  config
end