Sha256: 5cc8fa30913748af3665c790177d33c84f2fb7ae916d05e71047a3a5c9e0324d
Contents?: true
Size: 524 Bytes
Versions: 5
Compression:
Stored size: 524 Bytes
Contents
require 'generators/zoo' module Zoo 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
5 entries across 5 versions & 1 rubygems