class Guard::RSpec::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

Attributes

focused_locations[RW]

Public Class Methods

new(options = {}) click to toggle source
# File lib/guard/rspec/inspectors/focused_inspector.rb, line 12
def initialize(options = {})
  super
  @focused_locations = []
end

Public Instance Methods

failed(locations) click to toggle source
# File lib/guard/rspec/inspectors/focused_inspector.rb, line 25
def failed(locations)
  if locations.empty?
    @focused_locations = []
  elsif focused_locations.empty?
    @focused_locations = locations
  end
end
paths(paths) click to toggle source
# File lib/guard/rspec/inspectors/focused_inspector.rb, line 17
def paths(paths)
  if focused_locations.any?
    focused_locations
  else
    _clean(paths)
  end
end
reload() click to toggle source
# File lib/guard/rspec/inspectors/focused_inspector.rb, line 33
def reload
  @focused_locations = []
end