class Xronor::Generator::Crontab

Public Class Methods

generate(filename, options) click to toggle source
# File lib/xronor/generator/crontab.rb, line 5
        def generate(filename, options)
          jobs = Xronor::Parser.parse(filename)

          jobs.map do |job|
            <<-EOS
# #{job.name} - #{job.description}
#{[job.schedule, job.command].join(" ")}
EOS
          end.join("\n")
        end