Class: Atrium::ServiceGenerator

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

Instance Method Summary collapse

Instance Method Details

#create_serviceObject



4
5
6
7
8
9
# File 'lib/generators/atrium/service/service_generator.rb', line 4

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

#create_service_specObject



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

def create_service_spec
  template(
    'service_spec.rb.erb',
    File.join('spec/services/', "#{file_name}_spec.rb")
  )
end