模块:Mongoid::Matcher::All Private
- 定义于:
- lib/mongoid/matcher/all.rb
Overview
该模块是私有 API 的一部分。 您应尽可能避免使用此模块,因为它将来可能会被删除或更改。
$all表达式的内存中匹配器。
类方法摘要折叠
-
。匹配? (exists、value、condition)→ true | false,布尔值
private
返回值是否满足 $all表达式。
类方法详细信息
。匹配? (exists, value, Condition) ⇒ true | false ,布尔值
此方法是私有 API 的一部分。 您应尽可能避免使用此方法,因为它将来可能会被删除或更改。
返回值是否满足 $all表达式。
21 22 23 24 25 26 27 28 29 30 31 32 33 34 |
# File 'lib/mongoid/matcher/all.rb', line 21 module_function def 匹配?(存在, 值, 条件) 除非 阵列 === 条件 提高 Errors::InvalidQuery, " $all参数必须是一个大量: #{ Errors :: InvalidQuery . truncate_expr ( condition ) } " end !条件.空? && 条件.全部? do |C| 案例 C when ::regexp, BSON::regexp::原始 正则表达式(Regex).matches_array_or_scalar?(值, C) else EqImpl.匹配?(true, 值, C, ' $all ') end end end |