Sha256: 333c047de4f82a457594999a90aa642d53648e07e9c66b84eab942b7322df1ad
Contents?: true
Size: 505 Bytes
Versions: 167
Compression:
Stored size: 505 Bytes
Contents
# frozen_string_literal: true require 'open3' module EacRubyUtils module Envs class Process EXIT_CODE_KEY = :exit_code ERR_KEY = :stderr OUT_KEY = :stdout def initialize(command) self.data = { command: command } data[OUT_KEY], data[ERR_KEY], data[EXIT_CODE_KEY] = Open3.capture3(command) data[EXIT_CODE_KEY] = data[EXIT_CODE_KEY].to_i end def to_h data.dup end private attr_accessor :data end end end
Version data entries
167 entries across 167 versions & 3 rubygems