Class: Services::Generators::NewGenerator

Inherits:
Rails::Generators::Base
  • Object
show all
Defined in:
lib/generators/services/new_generator.rb

Instance Method Summary collapse

Instance Method Details

#create_new_serviceObject



13
14
15
16
17
18
# File 'lib/generators/services/new_generator.rb', line 13

def create_new_service
  template(
    "new_service.erb",
    "#{Rails.root}/app/namespaces/services/#{service_filepath}.rb"
  )
end

#create_new_service_specObject



20
21
22
23
24
25
# File 'lib/generators/services/new_generator.rb', line 20

def create_new_service_spec
  template(
    "new_service_spec.erb",
    "#{Rails.root}/spec/namespaces/services/#{service_filepath}_spec.rb"
  )
end