Class: CIAT::Feedback::FeedbackCounter
- Inherits:
-
Object
- Object
- CIAT::Feedback::FeedbackCounter
- Defined in:
- lib/ciat/feedback/feedback_counter.rb
Overview
This feedback class sends some simple messages to the screen about the progress of a CIAT::Suite run.
Instance Method Summary collapse
- #error_count ⇒ Object
- #failure_count ⇒ Object
- #increment_error_count ⇒ Object
- #increment_failure_count ⇒ Object
-
#initialize ⇒ FeedbackCounter
constructor
A new instance of FeedbackCounter.
- #post_tests(suite) ⇒ Object
- #pre_tests(suite) ⇒ Object
- #processor_result(processor) ⇒ Object
Constructor Details
#initialize ⇒ FeedbackCounter
Returns a new instance of FeedbackCounter.
6 7 8 9 |
# File 'lib/ciat/feedback/feedback_counter.rb', line 6 def initialize @error_count = 0 @failure_count = 0 end |
Instance Method Details
#error_count ⇒ Object
11 12 13 |
# File 'lib/ciat/feedback/feedback_counter.rb', line 11 def error_count @error_count end |
#failure_count ⇒ Object
15 16 17 |
# File 'lib/ciat/feedback/feedback_counter.rb', line 15 def failure_count @failure_count end |
#increment_error_count ⇒ Object
19 20 21 |
# File 'lib/ciat/feedback/feedback_counter.rb', line 19 def increment_error_count @error_count += 1 end |
#increment_failure_count ⇒ Object
23 24 25 |
# File 'lib/ciat/feedback/feedback_counter.rb', line 23 def increment_failure_count @failure_count += 1 end |
#post_tests(suite) ⇒ Object
31 32 33 |
# File 'lib/ciat/feedback/feedback_counter.rb', line 31 def post_tests(suite) nil end |
#pre_tests(suite) ⇒ Object
27 28 29 |
# File 'lib/ciat/feedback/feedback_counter.rb', line 27 def pre_tests(suite) nil end |
#processor_result(processor) ⇒ Object
35 36 37 38 39 40 41 42 |
# File 'lib/ciat/feedback/feedback_counter.rb', line 35 def processor_result(processor) case processor.light.setting when :red increment_failure_count when :yellow increment_error_count end end |