Class: Process::Group::Spawn
Overview
Executes a command using Process.spawn with the given arguments and options.
Instance Attribute Summary collapse
-
#arguments ⇒ Object
readonly
Returns the value of attribute arguments.
Attributes inherited from Command
Instance Method Summary collapse
- #call(**options) ⇒ Object
-
#initialize(arguments, **options) ⇒ Spawn
constructor
A new instance of Spawn.
Methods inherited from Command
Constructor Details
#initialize(arguments, **options) ⇒ Spawn
Returns a new instance of Spawn.
61 62 63 64 65 |
# File 'lib/process/group.rb', line 61 def initialize(arguments, **) @arguments = arguments super(**) end |
Instance Attribute Details
#arguments ⇒ Object (readonly)
Returns the value of attribute arguments.
67 68 69 |
# File 'lib/process/group.rb', line 67 def arguments @arguments end |
Instance Method Details
#call(**options) ⇒ Object
69 70 71 72 73 |
# File 'lib/process/group.rb', line 69 def call(**) = @options.merge() @pid = Process.spawn(*@arguments, **) end |