class ViewModel::AccessControl::Composed
def detect_allow(env, checkers)
def detect_allow(env, checkers) error = nil checkers.each do |checker| result = checker.check(env) next unless result if result.is_a?(StandardError) error ||= result else # short-circuit exit with success return true, nil end end error ||= NoRequiredConditionsError.new( env.view.blame_reference, checkers.map(&:name)) return false, error end