Class: Guard::Test::Inspectors::KeepingInspector
- Inherits:
-
BaseInspector
- Object
- BaseInspector
- Guard::Test::Inspectors::KeepingInspector
- Defined in:
- lib/guard/test/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
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.
11 12 13 14 |
# File 'lib/guard/test/inspectors/keeping_inspector.rb', line 11 def initialize( = {}) super @failed_locations = [] end |
Instance Method Details
#failed(locations) ⇒ Object
20 21 22 |
# File 'lib/guard/test/inspectors/keeping_inspector.rb', line 20 def failed(locations) @failed_locations = locations end |
#paths(paths) ⇒ Object
16 17 18 |
# File 'lib/guard/test/inspectors/keeping_inspector.rb', line 16 def paths(paths) _with_failed_locations(_clean(paths)) end |
#reload ⇒ Object
24 25 26 |
# File 'lib/guard/test/inspectors/keeping_inspector.rb', line 24 def reload @failed_locations = [] end |