Class: ActiveService::Generators::ServiceGenerator

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

Instance Method Summary collapse

Instance Method Details

#create_serviceObject



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

def create_service
  create_file "#{ActiveService::Configuration.path}/#{file_name}_service.rb", <<-FILE
class #{file_name.camelize}Service
  # your service methods
end
  FILE
end