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.
57 58 59 60 61 |
# File 'lib/process/group.rb', line 57 def initialize(arguments, **) @arguments = arguments super(**) end |
Instance Attribute Details
#arguments ⇒ Object (readonly)
Returns the value of attribute arguments.
63 64 65 |
# File 'lib/process/group.rb', line 63 def arguments @arguments end |
Instance Method Details
#call(**options) ⇒ Object
65 66 67 68 69 |
# File 'lib/process/group.rb', line 65 def call(**) = @options.merge() @pid = Process.spawn(*@arguments, **) end |