Sha256: e9148d125c0b27adfdb1689e686f069c600974b64f305adb6c8276d50a0fc7e7
Contents?: true
Size: 495 Bytes
Versions: 1
Compression:
Stored size: 495 Bytes
Contents
require 'yaml' module ActiveJob::Scheduler class Jobs include Enumerable attr_reader :path def initialize(from_path) @path = from_path end def self.from_yaml new "config/jobs.yml" end def each collection.each { |job| yield job } end private def collection params.keys.map do |name| Job.new params[name].merge name: name end end def params @collection ||= YAML::load_file path end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
activejob-scheduler-0.0.1 | lib/active_job/scheduler/jobs.rb |