Module: TabTab::LocalConfig
- Included in:
- InstallTabTab::CLI, CLI
- Defined in:
- lib/tabtab/local_config.rb
Instance Method Summary collapse
Instance Method Details
#config ⇒ Object
4 5 6 7 8 9 10 |
# File 'lib/tabtab/local_config.rb', line 4 def config @config ||= begin config_file = File.join(home, '.tabtab.yml') return {} unless File.exists?(config_file) YAML.load(File.read(config_file)) end end |
#home ⇒ Object
12 13 14 |
# File 'lib/tabtab/local_config.rb', line 12 def home ENV["HOME"] || ENV["HOMEPATH"] || File::("~") end |