Method: Foreman::Process#initialize

Defined in:
lib/foreman/process.rb

#initialize(command, options = {}) ⇒ Process

Create a Process

Parameters:

  • command (String)

    The command to run

  • options (Hash) (defaults to: {})

Options Hash (options):

  • :cwd (String) — default: ./

    Change to this working directory before executing the process

  • :env (Hash) — default: {}

    Environment variables to set for this process



17
18
19
20
21
22
# File 'lib/foreman/process.rb', line 17

def initialize(command, options={})
  @command = command
  @options = options.dup

  @options[:env] ||= {}
end