Class: FuryDumper::Generators::ConfigGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- FuryDumper::Generators::ConfigGenerator
- Defined in:
- lib/generators/fury_dumper/config_generator.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.gem_root ⇒ Object
6 7 8 |
# File 'lib/generators/fury_dumper/config_generator.rb', line 6 def self.gem_root File.('../../..', __dir__) end |
.source_root ⇒ Object
10 11 12 13 |
# File 'lib/generators/fury_dumper/config_generator.rb', line 10 def self.source_root # Use the templates from the 2.3.x generator File.join(gem_root, 'rails_generators', 'fury_dumper_config', 'templates') end |
Instance Method Details
#generate ⇒ Object
15 16 17 18 |
# File 'lib/generators/fury_dumper/config_generator.rb', line 15 def generate template 'fury_dumper.rb', File.join('config', 'initializers', 'fury_dumper.rb') template 'fury_dumper.yml', File.join('config', 'fury_dumper.yml') end |