Class: ROM::Generators::InstallGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- ROM::Generators::InstallGenerator
- Defined in:
- lib/generators/rom/install_generator.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.namespace ⇒ Object
6 7 8 |
# File 'lib/generators/rom/install_generator.rb', line 6 def self.namespace "rom:#{generator_name}" end |
.source_root ⇒ Object
10 11 12 |
# File 'lib/generators/rom/install_generator.rb', line 10 def self.source_root File.('install/templates', __dir__) end |
Instance Method Details
#add_application_model ⇒ Object
28 29 30 |
# File 'lib/generators/rom/install_generator.rb', line 28 def add_application_model copy_file "application_model.rb", "app/models/application_model.rb" end |
#add_types_module ⇒ Object
24 25 26 |
# File 'lib/generators/rom/install_generator.rb', line 24 def add_types_module copy_file "types.rb", "lib/types.rb" end |
#create_initializer ⇒ Object
19 20 21 22 |
# File 'lib/generators/rom/install_generator.rb', line 19 def create_initializer template 'initializer.rb.erb', File.join('config', 'initializers', 'rom.rb') end |