Sha256: 469f825853bf50fd4360b0797e3752a0659040e9fda5b85222f8cd0df3ab55e5
Contents?: true
Size: 538 Bytes
Versions: 14
Compression:
Stored size: 538 Bytes
Contents
require 'generators/nifty' module Nifty module Generators class ConfigGenerator < Base argument :config_name, :type => :string, :default => 'app', :banner => 'config_name' def create_config template "load_config.rb", "config/initializers/load_#{file_name}_config.rb" copy_file "config.yml", "config/#{file_name}_config.yml" end private def file_name config_name.underscore end def constant_name config_name.underscore.upcase end end end end
Version data entries
14 entries across 14 versions & 3 rubygems