Class: Guard::RSpec::Inspectors::KeepingInspector
- Inherits:
-
BaseInspector
- Object
- BaseInspector
- Guard::RSpec::Inspectors::KeepingInspector
- Defined in:
- lib/guard/rspec/inspectors/keeping_inspector.rb
Overview
Inspector that remembers all failed paths and returns that paths in future calls to #paths method along with any new paths passed as parameter to #paths
Instance Attribute Summary collapse
-
#failed_locations ⇒ Object
Returns the value of attribute failed_locations.
Attributes inherited from BaseInspector
Instance Method Summary collapse
- #failed(locations) ⇒ Object
-
#initialize(options = {}) ⇒ KeepingInspector
constructor
A new instance of KeepingInspector.
- #paths(paths) ⇒ Object
- #reload ⇒ Object
Constructor Details
#initialize(options = {}) ⇒ KeepingInspector
Returns a new instance of KeepingInspector.
12 13 14 15 |
# File 'lib/guard/rspec/inspectors/keeping_inspector.rb', line 12 def initialize( = {}) super @failed_locations = [] end |
Instance Attribute Details
#failed_locations ⇒ Object
Returns the value of attribute failed_locations.
10 11 12 |
# File 'lib/guard/rspec/inspectors/keeping_inspector.rb', line 10 def failed_locations @failed_locations end |
Instance Method Details
#failed(locations) ⇒ Object
21 22 23 |
# File 'lib/guard/rspec/inspectors/keeping_inspector.rb', line 21 def failed(locations) @failed_locations = locations end |
#paths(paths) ⇒ Object
17 18 19 |
# File 'lib/guard/rspec/inspectors/keeping_inspector.rb', line 17 def paths(paths) _with_failed_locations(_clean(paths)) end |
#reload ⇒ Object
25 26 27 |
# File 'lib/guard/rspec/inspectors/keeping_inspector.rb', line 25 def reload @failed_locations = [] end |