Class: PowerTypes::InitGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- PowerTypes::InitGenerator
- Defined in:
- lib/generators/power_types/init_generator.rb
Instance Method Summary collapse
Instance Method Details
#config_presenters ⇒ Object
14 15 16 17 18 19 20 |
# File 'lib/generators/power_types/init_generator.rb', line 14 def config_presenters insert_into_file( "app/controllers/application_controller.rb", "\n include PowerTypes::Presentable", after: "ActionController::Base" ) end |
#create_folders ⇒ Object
5 6 7 8 9 10 11 12 |
# File 'lib/generators/power_types/init_generator.rb', line 5 def create_folders empty_directory "app/commands/" empty_directory "app/services/" empty_directory "app/observers/" empty_directory "app/presenters/" empty_directory "app/utils/" empty_directory "app/values/" end |