Class: Unifig::ConfigGenerator

Inherits:
Rails::Generators::Base
  • Object
show all
Defined in:
lib/generators/unifig/config_generator.rb

Instance Method Summary collapse

Instance Method Details

#configObject



9
10
11
12
13
14
15
16
17
18
# File 'lib/generators/unifig/config_generator.rb', line 9

def config
  abort 'A configuration file already exists.' if File.exist?(Unifig::Rails::CONFIG_PATH)

  create_file Unifig::Rails::CONFIG_PATH, <<~YML
    unifig:
      providers: local


  YML
end