module CLI::Job
Methods for creating and editing jobs
Public Class Methods
default()
click to toggle source
# File lib/robot_sweatshop/cli/job.rb, line 6 def self.default File.read "#{__dir__}/../templates/default_job.yaml" end
list()
click to toggle source
# File lib/robot_sweatshop/cli/job.rb, line 14 def self.list job_path = File.expand_path configatron.job_path puts Dir.glob("#{job_path}/*.yaml").map { |file| File.basename(file, '.yaml') } end
path_for(job)
click to toggle source
# File lib/robot_sweatshop/cli/job.rb, line 10 def self.path_for(job) "#{configatron.job_path}/#{job}.yaml" end