Class: FWToolkit::Executable::CliRunner

Inherits:
Object
  • Object
show all
Defined in:
lib/fwtoolkit/executable/executable.rb

Instance Method Summary collapse

Instance Method Details

#report_error(command, command_output) ⇒ Object



22
23
24
25
26
27
# File 'lib/fwtoolkit/executable/executable.rb', line 22

def report_error(command, command_output)
  command_output.gsub!(/e\[\d+m/, '')
  puts "An error has occured while running: \"#{command}\"", :red
  puts 'Command output:'
  raise "\n***\n#{command_output}***"
end

#run(command, config = {}) ⇒ Object



18
19
20
# File 'lib/fwtoolkit/executable/executable.rb', line 18

def run(command, config={})
  `#{command}`
end