class Guard::Test::Inspectors::FocusedInspector
Inspector
that focuses on set of paths if any of them is failing. Returns only that set of paths on all future calls to paths
until they all pass
Public Class Methods
new(options = {})
click to toggle source
Calls superclass method
Guard::Test::Inspectors::BaseInspector::new
# File lib/guard/test/inspectors/focused_inspector.rb, line 11 def initialize(options = {}) super @focused_locations = [] end
Public Instance Methods
failed(locations)
click to toggle source
# File lib/guard/test/inspectors/focused_inspector.rb, line 24 def failed(locations) if locations.empty? @focused_locations = [] else @focused_locations = locations if @focused_locations.empty? end end
paths(paths)
click to toggle source
# File lib/guard/test/inspectors/focused_inspector.rb, line 16 def paths(paths) if @focused_locations.any? @focused_locations else _clean(paths) end end
reload()
click to toggle source
# File lib/guard/test/inspectors/focused_inspector.rb, line 32 def reload @focused_locations = [] end