Module: Coque::Runnable
Instance Method Summary collapse
Instance Method Details
#log_start ⇒ Object
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 |
#run ⇒ Object
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
7 8 9 |
# File 'lib/coque/runnable.rb', line 7 def success? run.success? end |
#to_a ⇒ Object
3 4 5 |
# File 'lib/coque/runnable.rb', line 3 def to_a run.to_a end |