Class: Tengu::Result
- Inherits:
-
Object
- Object
- Tengu::Result
- Defined in:
- lib/tengu/result.rb
Instance Attribute Summary collapse
-
#pending_count ⇒ Object
readonly
Returns the value of attribute pending_count.
-
#success_count ⇒ Object
readonly
Returns the value of attribute success_count.
-
#total_count ⇒ Object
readonly
Returns the value of attribute total_count.
Instance Method Summary collapse
- #failure_count ⇒ Object
-
#initialize(files) ⇒ Result
constructor
A new instance of Result.
Constructor Details
#initialize(files) ⇒ Result
Returns a new instance of Result.
5 6 7 8 9 10 |
# File 'lib/tengu/result.rb', line 5 def initialize(files) @files = files @success_count = @files.inject(0) { |sum, n| sum += n.success_count } @total_count = @files.inject(0) { |sum, n| sum += n.test_count } @pending_count = @files.inject(0) { |sum, n| sum += n.pending_count } end |
Instance Attribute Details
#pending_count ⇒ Object (readonly)
Returns the value of attribute pending_count.
3 4 5 |
# File 'lib/tengu/result.rb', line 3 def pending_count @pending_count end |
#success_count ⇒ Object (readonly)
Returns the value of attribute success_count.
3 4 5 |
# File 'lib/tengu/result.rb', line 3 def success_count @success_count end |
#total_count ⇒ Object (readonly)
Returns the value of attribute total_count.
3 4 5 |
# File 'lib/tengu/result.rb', line 3 def total_count @total_count end |
Instance Method Details
#failure_count ⇒ Object
12 13 14 |
# File 'lib/tengu/result.rb', line 12 def failure_count total_count - success_count end |