class Xronor::CLI

Constants

DEFAULT_JOB_PREFIX

Public Instance Methods

crontab(filename) click to toggle source
# File lib/xronor/cli.rb, line 6
def crontab(filename)
  body = Xronor::Generator::Crontab.generate(filename, options)
  puts body
end
cwa(filename) click to toggle source
# File lib/xronor/cli.rb, line 19
def cwa(filename)
  Xronor::Generator::CloudWatchEvents.generate(filename, options)
end
template(filename) click to toggle source
# File lib/xronor/cli.rb, line 25
def template(filename)
  body = Xronor::Generator::ERB.generate_all_in_one(filename, options)
  puts body
end
template_per_job(filename) click to toggle source
# File lib/xronor/cli.rb, line 34
def template_per_job(filename)
  contents = Xronor::Generator::ERB.generate_per_job(filename, options)

  contents.each do |name, body|
    path = File.join(options[:outdir], options[:ext] ? "#{name}.#{options[:ext]}" : name)
    open(path, "w+") { |f| f.puts body }
  end
end