Class: Typescript::Monkey::CLI

Inherits:
Object
  • Object
show all
Defined in:
lib/typescript/monkey/cli.rb

Overview

The CLI class.

A class that implements a basic interface to command line programs.

Class Method Summary collapse

Class Method Details

.run_command(command, args = []) ⇒ String, Process::Status

Run a command with arguments

Returns:

  • (String, String, Process::Status)

    stdout, stderr, and the status of the command results.

See Also:

  • Process::Status


17
18
19
20
# File 'lib/typescript/monkey/cli.rb', line 17

def self.run_command(command, args=[])
  args_string = args.join(" ")
  _stdout, _stderr, _status = Open3.capture3("\"#{command}\" #{args_string}")
end