Class: Lino::Executors::Open4

Inherits:
Object
  • Object
show all
Defined in:
lib/lino/executors/open4.rb

Instance Method Summary collapse

Instance Method Details

#==(other) ⇒ Object Also known as: eql?



21
22
23
# File 'lib/lino/executors/open4.rb', line 21

def ==(other)
  self.class == other.class
end

#execute(command_line, opts = {}) ⇒ Object



8
9
10
11
12
13
14
15
16
17
18
19
# File 'lib/lino/executors/open4.rb', line 8

def execute(command_line, opts = {})
  opts = with_defaults(opts)

  ::Open4.spawn(
    command_line.env,
    *command_line.array,
    stdin: opts[:stdin],
    stdout: opts[:stdout],
    stderr: opts[:stderr],
    cwd: command_line.working_directory
  )
end

#hashObject



27
28
29
# File 'lib/lino/executors/open4.rb', line 27

def hash
  self.class.hash
end