Sha256: d6a451165b62f5628d3daeba3c06a384e2fa1429ec68d6808dcec14201a57b3e
Contents?: true
Size: 775 Bytes
Versions: 4
Compression:
Stored size: 775 Bytes
Contents
# frozen_string_literal: true require 'childprocess' module NoradBeacon class MultiRunner < Runner attr_reader :result_sets # Initialize an instance of the MultiRunner class # # @param prog [String] the program to execute # @param args [Array] list of arguments to pass to the program # @param timeout [Fixnum] optionally specify the timeout for the sub process # @return [NoradBeacon::Runner] an instance of the Runner class def initialize(prog, args, timeout = 600) raise ArgumentError, 'args must be an Array' unless args.is_a?(Array) @prog = prog @timeout = timeout @results_file = "/tmp/#{@prog}.#{Time.now.strftime('%Y%m%d-%H%M%S')}" @result_sets = [] @args = format_args(args) end end end
Version data entries
4 entries across 4 versions & 1 rubygems