Class: ProcessBuilder::Builder

Inherits:
ProcessBuilder show all
Defined in:
lib/process_builder.rb

Overview

Builder object that is passed to the block given to the ProcessBuilder.build and ProcessBuilder.copy methods. The Builder object has writable attributes allowing the block to customize the attributes of the process.

Constant Summary

Constants inherited from ProcessBuilder

VERSION

Instance Attribute Summary collapse

Attributes inherited from ProcessBuilder

#close_others, #command_line, #directory, #environment, #pgroup, #redirection, #rlimit, #umask, #unsetenv_others

Instance Method Summary collapse

Methods inherited from ProcessBuilder

build, #capture2, #capture3, copy, #initialize_copy, #popen2, #popen2e, #popen3, #spawn, #spawn_args

Constructor Details

#initialize(initial_state) ⇒ Builder



213
214
215
# File 'lib/process_builder.rb', line 213

def initialize(initial_state)
  self.copy_fields(initial_state)
end

Instance Attribute Details

#close_others=(value) ⇒ Object (writeonly)

Sets the attribute close_others



210
211
212
# File 'lib/process_builder.rb', line 210

def close_others=(value)
  @close_others = value
end

#command_line=(value) ⇒ Object (writeonly)

Sets the attribute command_line



210
211
212
# File 'lib/process_builder.rb', line 210

def command_line=(value)
  @command_line = value
end

#directory=(value) ⇒ Object (writeonly)

Sets the attribute directory



210
211
212
# File 'lib/process_builder.rb', line 210

def directory=(value)
  @directory = value
end

#environment=(value) ⇒ Object (writeonly)

Sets the attribute environment



210
211
212
# File 'lib/process_builder.rb', line 210

def environment=(value)
  @environment = value
end

#pgroup=(value) ⇒ Object (writeonly)

Sets the attribute pgroup



210
211
212
# File 'lib/process_builder.rb', line 210

def pgroup=(value)
  @pgroup = value
end

#rlimit_resourcename=(value) ⇒ Object (writeonly)

Sets the attribute rlimit_resourcename



210
211
212
# File 'lib/process_builder.rb', line 210

def rlimit_resourcename=(value)
  @rlimit_resourcename = value
end

#umask=(value) ⇒ Object (writeonly)

Sets the attribute umask



210
211
212
# File 'lib/process_builder.rb', line 210

def umask=(value)
  @umask = value
end