class Guard::Runner

def _scoped_plugins(scopes = {})

Other tags:
    Yield: - the task to run

Parameters:
  • scopes (Hash) -- hash with plugins or a groups scope
def _scoped_plugins(scopes = {})
  if plugins = _current_plugins_scope(scopes)
    plugins.each do |guard|
      yield(guard)
    end
  else
    _current_groups_scope(scopes).each do |group|
      current_plugin = nil
      block_return = catch :task_has_failed do
        ::Guard.plugins(group: group.name).each do |guard|
          current_plugin = guard
          yield(guard)
        end
      end
      if block_return.nil?
        ::Guard::UI.info "#{ current_plugin.class.name } has failed, other group's plugins execution has been halted."
      end
    end
  end
end