Method: Ruber::ExternalProgramPlugin#run_process

Defined in:
lib/ruber/external_program_plugin.rb

#run_process(prog, dir, args, title = '') ⇒ Object

Starts the program.

prog is the name of the program (you don’t need to specify the absolute path if it’s in PATH). args is an array containing the arguments. dir is the working directory.

title is the string to display in the output widget. If it is an empty string, the name of the program followed by its arguments will be used. If it is nil or false, the title won’t be set.



142
143
144
145
146
147
148
149
150
151
152
153
154
# File 'lib/ruber/external_program_plugin.rb', line 142

def run_process prog, dir, args, title = ''
  @buffer = nil
  @buffer_content_channel = nil
  @process.clear_program
  @process.working_directory = dir
  program = [prog] + args
  @process.program = program
  if @output_widget and title
    title = program.join ' ' if title.empty?
    @output_widget.title = title
  end
  @process.start
end