module Coque::Runnable

Public Instance Methods

log_start() click to toggle source
# File lib/coque/runnable.rb, line 33
def log_start
  if Coque.logger
    Coque.logger.info("Executing Coque Command: #{self.to_s}")
  end
end
run() click to toggle source
# File lib/coque/runnable.rb, line 28
def run
  log_start
  get_result
end
run!() click to toggle source
# File lib/coque/runnable.rb, line 20
def run!
  if !success?
    raise "Coque Command Failed: #{self}"
  else
    self
  end
end
success?() click to toggle source
# File lib/coque/runnable.rb, line 16
def success?
  run.success?
end
to_a() click to toggle source
# File lib/coque/runnable.rb, line 3
def to_a
  run.to_a
end
to_a!() click to toggle source
# File lib/coque/runnable.rb, line 7
def to_a!
  res = run
  rows = res.to_a
  unless res.exit_code == 0
    raise "Coque Command Failed: #{self}"
  end
  rows
end