Class: Typus::Generators::ConfigGenerator

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

Instance Method Summary collapse

Instance Method Details

#generate_configObject



13
14
15
16
17
18
19
20
21
# File 'lib/generators/typus/config_generator.rb', line 13

def generate_config
  copy_file "config/typus/README"
  generate_yaml.each do |key, value|
    if (@configuration = value)[:base].present?
      template "config/typus/application.yml", "config/typus/#{key}.yml"
      template "config/typus/application_roles.yml", "config/typus/#{key}_roles.yml"
    end
  end
end