Class: ServiceGenerator

Inherits:
Rails::Generators::NamedBase
  • Object
show all
Defined in:
lib/generators/service/service_generator.rb

Instance Method Summary collapse

Instance Method Details

#create_service_fileObject



6
7
8
# File 'lib/generators/service/service_generator.rb', line 6

def create_service_file
  template('service.rb', File.join('app/services', class_path, "#{file_name}.rb"))
end

#generate_locale_fileObject



10
11
12
13
14
# File 'lib/generators/service/service_generator.rb', line 10

def generate_locale_file
  return unless ActiveGenerator.configuration.autoload_service_generator_locale

  invoke('locale:service', [name])
end