Created
December 19, 2017 01:08
-
-
Save mctaylorpants/584617712ecd67f924ba16df0a281fd6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Run the strategies for a given scope | |
def _run_strategies_for(scope, args) #:nodoc: | |
self.winning_strategy = @winning_strategies[scope] | |
return if winning_strategy && winning_strategy.halted? | |
# ... | |
(strategies || args).each do |name| | |
strategy = _fetch_strategy(name, scope) | |
next unless strategy && !strategy.performed? && strategy.valid? | |
strategy._run! | |
self.winning_strategy = @winning_strategies[scope] = strategy | |
break if strategy.halted? | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment