Sha256: 86db95d69542a313933ffaa552cc3a2e8f6dc4fd89560dbc1d09ad67147bd441
Contents?: true
Size: 722 Bytes
Versions: 12
Compression:
Stored size: 722 Bytes
Contents
module Cardio class Command # shared handling of commands splitting cardio and original args with "--" class CommandBase def run puts command exit_with_child_status command end def exit_with_child_status command command += " 2>&1" exit $CHILD_STATUS.exitstatus unless system command end # split special cardio args and original command args separated by '--' def split_args args before_split = true cardio_args, command_args = args.partition do |a| before_split = (a == "--" ? false : before_split) end command_args.shift [cardio_args, command_args] end end end end
Version data entries
12 entries across 12 versions & 1 rubygems