class Guard::Runner

def _clearable?(guard, modified_paths, added_paths, removed_paths)

Parameters:
  • removed_paths (Array) -- the removed paths.
  • added_paths (Array) -- the added paths.
  • modified_paths (Array) -- the modified paths.
  • guard (Guard::Plugin) -- the Guard plugin where run_on_changes is called
def _clearable?(guard, modified_paths, added_paths, removed_paths)
  (MODIFICATION_TASKS.any? { |task| guard.respond_to?(task) } && !modified_paths.empty?) ||
  (ADDITION_TASKS.any? { |task| guard.respond_to?(task) } && !added_paths.empty?) ||
  (REMOVAL_TASKS.any? { |task| guard.respond_to?(task) } && !removed_paths.empty?)
end