Class: Caco::Executer

Inherits:
Trailblazer::Operation
  • Object
show all
Extended by:
ClassMethods
Defined in:
lib/caco/executer.rb

Defined Under Namespace

Modules: ClassMethods

Instance Method Summary collapse

Instance Method Details

#execute!(ctx, command:) ⇒ Object



5
6
7
8
9
10
11
12
13
# File 'lib/caco/executer.rb', line 5

def execute!(ctx, command:, **)
  s, e, o, error = self.class.send(:execute, command)
  ctx[:signal] = [s, e, o, error]
  ctx[:exit_code] = e
  ctx[:output] = o
  ctx[:stderr] = error

  return s
end