Class: RunnerHelperGenerator

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

Overview

Generates runner class and systemd unit file

Instance Method Summary collapse

Instance Method Details

#gen_runner_classObject



11
12
13
# File 'lib/generators/runner_helper/runner_helper_generator.rb', line 11

def gen_runner_class
  template('runner_helper.rb.erb', "app/runners/#{file_name}_runner.rb")
end

#gen_unit_fileObject



15
16
17
# File 'lib/generators/runner_helper/runner_helper_generator.rb', line 15

def gen_unit_file
  template('unit.service.erb', "vendor/systemd/#{file_name}.service")
end