Class: Service::Generators::SetupGenerator

Inherits:
Rails::Generators::Base
  • Object
show all
Defined in:
lib/generators/service/setup/setup_generator.rb

Constant Summary collapse

DIRS =
%w(listeners jobs externals queries usecases commands entities usecases/micros)

Instance Method Summary collapse

Instance Method Details

#setupObject



10
11
12
13
14
15
16
17
# File 'lib/generators/service/setup/setup_generator.rb', line 10

def setup
  DIRS.each do |dir|
    empty_directory("#{service_path}/#{dir}")
  end

  path = "#{service_path}/doc.md"
  template 'doc.md.erb', path unless File.exist?(path)
end