Module: Mixin::DefaultConfig
- Includes:
- ConfigChoice
- Defined in:
- lib/clearbooks/interface/thor/mixin/default_config.rb
Instance Method Summary collapse
Methods included from ConfigChoice
Instance Method Details
#defaults ⇒ Object
17 18 19 20 21 22 23 24 25 |
# File 'lib/clearbooks/interface/thor/mixin/default_config.rb', line 17 def defaults config_path = File.( '~/.clearbooks/config.yml' ) if File.exists?(config_path) YAML.load_file(config_path) else FileUtils.mkdir_p( File.( '~/.clearbooks' ) ) config_choice end end |