Class: Guard::RSpec::Results
- Inherits:
-
Object
- Object
- Guard::RSpec::Results
- Defined in:
- lib/guard/rspec/results.rb
Defined Under Namespace
Classes: InvalidData
Instance Attribute Summary collapse
-
#failed_paths ⇒ Object
readonly
Returns the value of attribute failed_paths.
-
#summary ⇒ Object
readonly
Returns the value of attribute summary.
Instance Method Summary collapse
-
#initialize(filename) ⇒ Results
constructor
A new instance of Results.
Constructor Details
#initialize(filename) ⇒ Results
Returns a new instance of Results.
10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/guard/rspec/results.rb', line 10 def initialize(filename) lines = File.readlines(filename) if lines.empty? || lines.first.empty? dump = lines.inspect raise InvalidData, "Invalid results in: #{filename},"\ " lines:\n#{dump}\n" end @summary = lines.first.chomp @failed_paths = lines[1..11].map(&:chomp).compact end |
Instance Attribute Details
#failed_paths ⇒ Object (readonly)
Returns the value of attribute failed_paths.
8 9 10 |
# File 'lib/guard/rspec/results.rb', line 8 def failed_paths @failed_paths end |
#summary ⇒ Object (readonly)
Returns the value of attribute summary.
7 8 9 |
# File 'lib/guard/rspec/results.rb', line 7 def summary @summary end |