Module: Coque::Runnable

Included in:
Cmd, Pipeline
Defined in:
lib/coque/runnable.rb

Instance Method Summary collapse

Instance Method Details

#log_startObject



22
23
24
25
26
# File 'lib/coque/runnable.rb', line 22

def log_start
  if Coque.logger
    Coque.logger.info("Executing Coque Command: #{self.to_s}")
  end
end

#runObject



17
18
19
20
# File 'lib/coque/runnable.rb', line 17

def run
  log_start
  get_result
end

#run!Object



11
12
13
14
15
# File 'lib/coque/runnable.rb', line 11

def run!
  if !success?
    raise "Coque Command Failed: #{self}"
  end
end

#success?Boolean

Returns:

  • (Boolean)


7
8
9
# File 'lib/coque/runnable.rb', line 7

def success?
  run.success?
end

#to_aObject



3
4
5
# File 'lib/coque/runnable.rb', line 3

def to_a
  run.to_a
end