Class: Guard::Test::Inspectors::KeepingInspector

Inherits:
BaseInspector show all
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

#options, #test_paths

Instance Method Summary collapse

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(options = {})
  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

#reloadObject



24
25
26
# File 'lib/guard/test/inspectors/keeping_inspector.rb', line 24

def reload
  @failed_locations = []
end