Class: Komenda::ProcessBuilder
- Inherits:
-
Object
- Object
- Komenda::ProcessBuilder
- Defined in:
- lib/komenda/process_builder.rb
Instance Attribute Summary collapse
-
#command ⇒ Object
Returns the value of attribute command.
-
#cwd ⇒ Object
Returns the value of attribute cwd.
-
#env ⇒ Object
Returns the value of attribute env.
-
#events ⇒ Object
Returns the value of attribute events.
Instance Method Summary collapse
- #create ⇒ Komenda::Process
-
#initialize(command, options = {}) ⇒ ProcessBuilder
constructor
A new instance of ProcessBuilder.
Constructor Details
#initialize(command, options = {}) ⇒ ProcessBuilder
Returns a new instance of ProcessBuilder.
10 11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/komenda/process_builder.rb', line 10 def initialize(command, = {}) defaults = { env: ENV.to_hash, cwd: nil, events: {} } = defaults.merge() self.command = command self.env = [:env] self.cwd = [:cwd] self.events = [:events] end |
Instance Attribute Details
#command ⇒ Object
Returns the value of attribute command.
3 4 5 |
# File 'lib/komenda/process_builder.rb', line 3 def command @command end |
#cwd ⇒ Object
Returns the value of attribute cwd.
5 6 7 |
# File 'lib/komenda/process_builder.rb', line 5 def cwd @cwd end |
#env ⇒ Object
Returns the value of attribute env.
4 5 6 |
# File 'lib/komenda/process_builder.rb', line 4 def env @env end |
#events ⇒ Object
Returns the value of attribute events.
6 7 8 |
# File 'lib/komenda/process_builder.rb', line 6 def events @events end |
Instance Method Details
#create ⇒ Komenda::Process
25 26 27 |
# File 'lib/komenda/process_builder.rb', line 25 def create Komenda::Process.new(self) end |