Class: GreenPepper::FreeTextExecutionResults
- Inherits:
-
ExecutionResults
- Object
- ExecutionResults
- GreenPepper::FreeTextExecutionResults
- Defined in:
- lib/greenpepper/example/executionresults.rb
Instance Attribute Summary collapse
-
#results ⇒ Object
readonly
Returns the value of attribute results.
Attributes inherited from ExecutionResults
#errors, #failures, #ignored, #successes
Instance Method Summary collapse
- #[](value) ⇒ Object
- #add_result(result) ⇒ Object
-
#initialize ⇒ FreeTextExecutionResults
constructor
A new instance of FreeTextExecutionResults.
- #to_s ⇒ Object
Methods inherited from ExecutionResults
#add_error, #add_failure, #add_ignore, #add_success, get_all_results
Constructor Details
#initialize ⇒ FreeTextExecutionResults
Returns a new instance of FreeTextExecutionResults.
60 61 62 63 |
# File 'lib/greenpepper/example/executionresults.rb', line 60 def initialize super @results = [] end |
Instance Attribute Details
#results ⇒ Object (readonly)
Returns the value of attribute results.
59 60 61 |
# File 'lib/greenpepper/example/executionresults.rb', line 59 def results @results end |
Instance Method Details
#[](value) ⇒ Object
70 71 72 |
# File 'lib/greenpepper/example/executionresults.rb', line 70 def [](value) results[value] end |
#add_result(result) ⇒ Object
65 66 67 68 |
# File 'lib/greenpepper/example/executionresults.rb', line 65 def add_result(result) @results << result result.update_stats(self) end |
#to_s ⇒ Object
74 75 76 |
# File 'lib/greenpepper/example/executionresults.rb', line 74 def to_s @results.join("\n") end |