Class: ServiceGenerator
- Inherits:
-
Rails::Generators::NamedBase
- Object
- Rails::Generators::NamedBase
- ServiceGenerator
- Defined in:
- lib/generators/service/service_generator.rb
Instance Method Summary collapse
Instance Method Details
#copy_initializer_file ⇒ Object
6 7 8 9 |
# File 'lib/generators/service/service_generator.rb', line 6 def copy_initializer_file template "service.erb", "app/services/#{file_name}.rb" template "service_test.erb", "test/services/#{file_name}_test.rb" end |
#service_name ⇒ Object
11 12 13 |
# File 'lib/generators/service/service_generator.rb', line 11 def service_name file_name.camelize end |