module FWToolkit::Executable

Public Class Methods

runner=(runner) click to toggle source
# File lib/fwtoolkit/executable/executable.rb, line 31
def self.runner=(runner)
  @@runner = runner
end

Public Instance Methods

run(command, options = {}) click to toggle source
# File lib/fwtoolkit/executable/executable.rb, line 35
def run(command, options = {})
  cmd_output = @@runner.run command, options
  @@runner.report_error(command, cmd_output) if options[:raise_errors] && !$?.success?
end
run!(command, options = {}) click to toggle source
# File lib/fwtoolkit/executable/executable.rb, line 40
def run!(command, options = {})
  config.merge!({ :raise_errors => true })
  run command config
end