class Mixlib::ShellOut
def parse_options(opts)
def parse_options(opts) opts.each do |option, setting| case option.to_s when 'cwd' self.cwd = setting when 'domain' self.domain = setting when 'password' self.password = setting when 'user' self.user = setting self.with_logon = setting when 'group' self.group = setting when 'umask' self.umask = setting when 'timeout' self.timeout = setting when 'returns' self.valid_exit_codes = Array(setting) when 'live_stream' self.live_stream = setting when 'input' self.input = setting when 'logger' self.logger = setting when 'log_level' self.log_level = setting when 'log_tag' self.log_tag = setting when 'environment', 'env' # passing :environment => nil means don't set any new ENV vars @environment = setting.nil? ? {} : @environment.dup.merge!(setting) else raise InvalidCommandOption, "option '#{option.inspect}' is not a valid option for #{self.class.name}" end end validate_options(opts) end