diff options
| author | Tim D. Smith | 2016-06-27 17:58:32 -0700 |
|---|---|---|
| committer | Tim D. Smith | 2016-06-29 21:16:50 -0700 |
| commit | 452fbda9af1bf8b4dfa1b4955ecb78f9790d8161 (patch) | |
| tree | 04b4d638f81583c9871dba16887f015a5aa13d27 | |
| parent | 1c27a75ca40cd232bccc59682ad411122c82ad59 (diff) | |
| download | brew-452fbda9af1bf8b4dfa1b4955ecb78f9790d8161.tar.bz2 | |
Document Step
| -rw-r--r-- | Library/Homebrew/dev-cmd/test-bot.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/Library/Homebrew/dev-cmd/test-bot.rb b/Library/Homebrew/dev-cmd/test-bot.rb index 78d90158d..745d66a33 100644 --- a/Library/Homebrew/dev-cmd/test-bot.rb +++ b/Library/Homebrew/dev-cmd/test-bot.rb @@ -93,9 +93,17 @@ module Homebrew end end + # Wraps command invocations. Instantiated by Test#test. + # Handles logging and pretty-printing. class Step attr_reader :command, :name, :status, :output, :time + # Instantiates a Step object. + # @param test [Test] The parent Test object + # @param command [Array<String>] Command to execute and arguments + # @param options [Hash] Recognized options are: + # :puts_output_on_success + # :repository def initialize(test, command, options = {}) @test = test @category = test.category @@ -152,6 +160,9 @@ module Homebrew @output && !@output.empty? end + # The execution time of the task. + # Precondition: Step#run has been called. + # @return [Float] execution time in seconds def time @end_time - @start_time end |
