Sha256: 84b68c820d2fb26a7276157a955e09b25d9cd2981a739f9f1740dcd510775edc
Contents?: true
Size: 685 Bytes
Versions: 6
Compression:
Stored size: 685 Bytes
Contents
module Psychic class Runner class ColdRunnerRegistry include Psychic::Logger BUILT_IN_DIR = File.expand_path('../cold', __FILE__) class << self def autoload_runners! # Load built-in runners Dir["#{BUILT_IN_DIR}/*.rb"].each do |cold_runner_file| require cold_runner_file end end def runner_classes @runner_classes ||= Set.new end def register(klass) runner_classes.add klass end def active_runners(opts) runners = runner_classes.map { |k| k.new(opts) } runners.select(&:active?) end end end end end
Version data entries
6 entries across 6 versions & 1 rubygems