Method: Gonzui::CommandLineApplication#initialize
- Defined in:
- lib/gonzui/cmdapp/app.rb
#initialize ⇒ CommandLineApplication
Returns a new instance of CommandLineApplication.
22 23 24 25 26 27 28 29 30 31 32 33 34 35 |
# File 'lib/gonzui/cmdapp/app.rb', line 22 def initialize @config = Config.new # ~/.gonzuirc has precedence over /etc/gonzuirc file_names = [] file_names.push(File.join(ENV['HOME'], ".gonzuirc")) if ENV['HOME'] file_names.push(File.join(SYSCONFDIR, "gonzuirc")) file_names.each {|file_name| if File.exist?(file_name) @config.load(file_name) break end } end |