lib/warden/proxy.rb
# Run the strategies for a given scope
Run the strategies for a given scope
Run the strategies for a given scope
def _run_strategies_for(scope, args) 
      self.winning_strategy = @winning_strategies[scope]
      return if winning_strategy && winning_strategy.halted?
      return if @locked
      if args.empty?
        defaults   = @config[:default_strategies]
        strategies = defaults[scope] || defaults[:_all]
      end
      (strategies || args).each do |name|
        strategy = _fetch_strategy(name, scope)
        next unless strategy && !strategy.performed? && strategy.valid?
        catch(:warden) do
          _update_winning_strategy(strategy, scope)
        end
        strategy._run!
        _update_winning_strategy(strategy, scope)
        break if strategy.halted?
      end
    end
def _run_strategies_for ( scope , args ) self . winning_strategy = @winning_strategies [ scope ] return if winning_strategy && winning_strategy . halted? return if @locked if args . empty? defaults = @config [ :default_strategies ] strategies = defaults [ scope ] || defaults [ :_all ] end ( strategies || args ) . each do | name | strategy = _fetch_strategy ( name , scope ) next unless strategy && ! strategy . performed? && strategy . valid? catch ( :warden ) do _update_winning_strategy ( strategy , scope ) end strategy . _run! _update_winning_strategy ( strategy , scope ) break if strategy . halted? end end
Run the strategies for a given scope
Run the strategies for a given scope
#:nodoc: # Do not run any strategy if locked
scope
<not_specific>
args
<not_specific>