Sha256: 72f6c1e37ebd5a1aa604035f3dbc6dc1325be7fac12d0d344ab98504b27de4ee
Contents?: true
Size: 819 Bytes
Versions: 214
Compression:
Stored size: 819 Bytes
Contents
# frozen_string_literal: true require 'active_support/core_ext/hash/indifferent_access' require 'active_support/core_ext/object/blank' require 'shellwords' module EacRubyUtils module Envs class Command module ExtraOptions def chdir(dir) duplicate_by_extra_options(chdir: dir) end def status_result(status_code, result) duplicate_by_extra_options(status_results: status_results.merge(status_code => result)) end private attr_reader :extra_options def status_results extra_options[:status_results] ||= {}.with_indifferent_access end def append_chdir(command) extra_options[:chdir].present? ? "(cd '#{extra_options[:chdir]}' ; #{command} )" : command end end end end end
Version data entries
214 entries across 214 versions & 4 rubygems