class Oncall::Invocations::InitRunner

Public Instance Methods

run(_err, _out) click to toggle source
# File lib/oncall/invocations/init_runner.rb, line 4
def run(_err, _out)
  config_template_path = File.join(File.dirname(__FILE__), '..', 'templates', 'oncall.yml.template')
  template = File.read(config_template_path)

  File.open(File.join(Dir.getwd, 'oncall.yml'), 'w') do |file|
    file.write(template)
  end
end