class EacRubyUtils::Envs::Command

def append(args)

def append(args)
  duplicate_by_command(self.args + args)
end

def command_line_without_env

Returns:
  • (String) -
def command_line_without_env
  c = args
  c = c.map { |x| escape(x) }.join(' ') if c.is_a?(Enumerable)
  append_chdir(append_envvars(c))
end

def duplicate(command, extra_options)

def duplicate(command, extra_options)
  self.class.new(env, command, extra_options)
end

def duplicate_by_command(new_command)

def duplicate_by_command(new_command)
  duplicate(new_command, extra_options)
end

def duplicate_by_extra_options(set_extra_options)

def duplicate_by_extra_options(set_extra_options)
  duplicate(args, extra_options.merge(set_extra_options))
end

def prepend(args)

def prepend(args)
  duplicate_by_command(args + self.args)
end

def sanitize_initialize_arguments(arguments)

Returns:
  • (Array) -

Parameters:
  • command (Array) --
def sanitize_initialize_arguments(arguments)
  if arguments.count == 1 && arguments.first.is_a?(Array)
    arguments.first
  elsif arguments.is_a?(Array)
    arguments
  else
    raise "Invalid argument command: #{arguments}|#{arguments.class}"
  end
end

def to_s

def to_s
  "#{args} [ENV: #{env}]"
end