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

Returns a new instance of 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

Parameters:

  • value

    the value to set the attribute close_others to.



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

Parameters:

  • value

    the value to set the attribute command_line to.



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

Parameters:

  • value

    the value to set the attribute directory to.



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

def directory=(value)
  @directory = value
end

#environment=(value) ⇒ Object (writeonly)

Sets the attribute environment

Parameters:

  • value

    the value to set the attribute environment to.



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

def environment=(value)
  @environment = value
end

#pgroup=(value) ⇒ Object (writeonly)

Sets the attribute pgroup

Parameters:

  • value

    the value to set the attribute pgroup to.



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

Parameters:

  • value

    the value to set the attribute rlimit_resourcename to.



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

Parameters:

  • value

    the value to set the attribute umask to.



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

def umask=(value)
  @umask = value
end