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



4
5
6
# File 'lib/generators/service/service_generator.rb', line 4

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

#generate_locale_fileObject



8
9
10
# File 'lib/generators/service/service_generator.rb', line 8

def generate_locale_file
  invoke("locale:service", [name]) if ActiveGenerator.configuration.autoload_service_generator_locale
end