Class: Fudge::Tasks::SubProcess
- Defined in:
- lib/fudge/tasks/sub_process.rb
Overview
Allow use of shell commands as tasks.
Unlike Fudge::Shell, this task will not spawn a new shell.
Allows the caller to set environment variables for the process, and to specify process attributes, as with Process::Spawn.
The constructor and #run method each accept two new options, :environment and :spawn_options.
Instance Attribute Summary collapse
-
#environment ⇒ Hash
Environment variables to be set for the process; the keys are strings, corresponding to the variables’ names (case sensitive).
-
#spawn_options ⇒ Hash
Attributes for the spawned process (see Ruby’s Process::spawn documentation for details).
Attributes inherited from Shell
Attributes inherited from Task
Method Summary
Methods inherited from Shell
Methods inherited from Task
Constructor Details
This class inherits a constructor from Fudge::Tasks::Shell
Instance Attribute Details
#environment ⇒ Hash
Returns environment variables to be set for the process; the keys are strings, corresponding to the variables’ names (case sensitive).
22 23 24 |
# File 'lib/fudge/tasks/sub_process.rb', line 22 def environment @environment end |
#spawn_options ⇒ Hash
Returns attributes for the spawned process (see Ruby’s Process::spawn documentation for details).
27 28 29 |
# File 'lib/fudge/tasks/sub_process.rb', line 27 def @spawn_options end |