Class: ConstGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- ConstGenerator
- Defined in:
- lib/generators/const_generator.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.source_root ⇒ Object
2 3 4 |
# File 'lib/generators/const_generator.rb', line 2 def self.source_root @source_root ||= File.('../templates', __FILE__) end |
Instance Method Details
#copy_config_files ⇒ Object
9 10 11 12 13 |
# File 'lib/generators/const_generator.rb', line 9 def copy_config_files copy_file('constants.yml', 'config/constants.yml') copy_file('load_const.rb', 'config/initializers/load_const.rb') readme("README") end |