Module: CLI::Job
- Defined in:
- lib/robot_sweatshop/cli/job.rb
Overview
Methods for creating and editing jobs
Class Method Summary collapse
Class Method Details
.default ⇒ Object
6 7 8 |
# File 'lib/robot_sweatshop/cli/job.rb', line 6 def self.default File.read "#{__dir__}/../templates/default_job.yaml" end |
.list ⇒ Object
14 15 16 17 |
# File 'lib/robot_sweatshop/cli/job.rb', line 14 def self.list job_path = File. configatron.job_path puts Dir.glob("#{job_path}/*.yaml").map { |file| File.basename(file, '.yaml') } end |
.path_for(job) ⇒ Object
10 11 12 |
# File 'lib/robot_sweatshop/cli/job.rb', line 10 def self.path_for(job) "#{configatron.job_path}/#{job}.yaml" end |