Class: TF::TextOutput
- Inherits:
-
Object
- Object
- TF::TextOutput
- Defined in:
- lib/plugins/tf/text_output.rb
Constant Summary collapse
- RED =
`tput setaf 1`
- GREEN =
`tput setaf 2`
- YELLOW =
`tput setaf 3`
- BLUE =
`tput setaf 4`
- RESET =
`tput sgr0`
Class Method Summary collapse
Instance Method Summary collapse
- #command_err(err) ⇒ Object
- #command_out(out) ⇒ Object
- #end_command(line, status, env) ⇒ Object
- #end_processing ⇒ Object
- #end_test(test) ⇒ Object
-
#initialize ⇒ TextOutput
constructor
A new instance of TextOutput.
- #start_command(line) ⇒ Object
- #start_processing ⇒ Object
- #start_test(test, env) ⇒ Object
- #test_processed(test, status, msg) ⇒ Object
Constructor Details
#initialize ⇒ TextOutput
Returns a new instance of TextOutput.
12 13 |
# File 'lib/plugins/tf/text_output.rb', line 12 def initialize end |
Class Method Details
.argument_matches?(argument) ⇒ Boolean
8 9 10 |
# File 'lib/plugins/tf/text_output.rb', line 8 def self.argument_matches? argument [:load] if argument == "--text" end |
Instance Method Details
#command_err(err) ⇒ Object
41 42 43 |
# File 'lib/plugins/tf/text_output.rb', line 41 def command_err err $stderr.puts err end |
#command_out(out) ⇒ Object
37 38 39 |
# File 'lib/plugins/tf/text_output.rb', line 37 def command_out out puts out end |
#end_command(line, status, env) ⇒ Object
33 34 35 |
# File 'lib/plugins/tf/text_output.rb', line 33 def end_command line, status, env #puts ": $?=#{status}" end |
#end_processing ⇒ Object
18 19 |
# File 'lib/plugins/tf/text_output.rb', line 18 def end_processing end |
#end_test(test) ⇒ Object
25 26 27 |
# File 'lib/plugins/tf/text_output.rb', line 25 def end_test test #puts "#{BLUE}##### finished test #{test[:name]}.#{RESET}" end |
#start_command(line) ⇒ Object
29 30 31 |
# File 'lib/plugins/tf/text_output.rb', line 29 def start_command line puts "#{YELLOW}$ #{line[:cmd]}#{RESET}" end |
#start_processing ⇒ Object
15 16 |
# File 'lib/plugins/tf/text_output.rb', line 15 def start_processing end |