Class: Kybus::CLI::Bot::Config::AutoconfigGenerator

Inherits:
FileProvider
  • Object
show all
Defined in:
lib/kybus/cli/bot/file_providers/autoconfig_generator.rb

Instance Method Summary collapse

Methods inherited from FileProvider

autoregister!, #bot_name, #bot_name_class, #bot_name_constantize, #bot_name_snake_case, #generate, #initialize, #keep_files, #skip_file?

Constructor Details

This class inherits a constructor from Kybus::CLI::Bot::FileProvider

Instance Method Details

#make_contentsObject



14
15
16
17
18
19
20
21
22
23
# File 'lib/kybus/cli/bot/file_providers/autoconfig_generator.rb', line 14

def make_contents
  <<~YAML
    autoconfig:
      env_prefix: #{bot_name_constantize}
      default_files:
        - ./config/config.default.yaml
      files:
        - ./config/config.yaml
  YAML
end

#saving_pathObject



10
11
12
# File 'lib/kybus/cli/bot/file_providers/autoconfig_generator.rb', line 10

def saving_path
  'config/autoconfig.yaml'
end