lib/clippy.rb
def run_command(type, data = "")
    i, o, e, p = Open3.popen3(binary + COMMAND_ARGS[binary][type])
    type == "stdin" ? i.print(data) : out = o.read.strip
    [i, o, e].map(&:close)

    [
      p.value,
      type == "stdin" ? data : out
    ]
  end
# --
# Run a command and get the output.
# rubocop:enable Lint/LiteralInCondition
# @return [Array]
# --
Run a command and get the output.
Run a command and get the output .
def run_command(type, data = "")
    i, o, e, p = Open3.popen3(binary + COMMAND_ARGS[binary][type])
    type == "stdin" ? i.print(data) : out = o.read.strip
    [i, o, e].map(&:close)
    [
      p.value,
      type == "stdin" ? data : out
    ]
  end
def run_command ( type , data = "" ) i , o , e , p = Open3 . popen3 ( binary + COMMAND_ARGS [ binary ] [ type ] ) type == "stdin" ? i . print ( data ) : out = o . read . strip [ i , o , e ] . map ( & :close ) [ p . value , type == "stdin" ? data : out ] end
Run a command and get the output.
Run a command and get the output .
None
Array
type
data