class Guard::Runner
def run_on_changes(modified, added, removed)
-
removed
(Array
) -- the removed paths. -
added
(Array
) -- the added paths. -
modified
(Array
) -- the modified paths.
def run_on_changes(modified, added, removed) types = { MODIFICATION_TASKS => modified, ADDITION_TASKS => added, REMOVAL_TASKS => removed } UI.clearable Guard.state.scope.grouped_plugins.each do |_group, plugins| _run_group_plugins(plugins) do |plugin| UI.clear types.each do |tasks, unmatched_paths| next if unmatched_paths.empty? match_result = Watcher.match_files(plugin, unmatched_paths) next if match_result.empty? task = tasks.detect { |meth| plugin.respond_to?(meth) } _supervise(plugin, task, match_result) if task end end end end