Method: Predicate#attr_split
- Defined in:
- lib/predicate.rb
#attr_split ⇒ Object
Returns a hash ‘(attr -> Pattr)` associating attribute names to predicates, so that each predicate Pattr only makes reference to the corresponding attribute name attr, while the conjunction of `Pattr`s is still equivalent to the original predicate.
A nil key may map a predicate that still makes references to more than one attribute.
139 140 141 142 143 |
# File 'lib/predicate.rb', line 139 def attr_split expr.attr_split.each_pair.each_with_object({}) do |(k,v),h| h[k] = Predicate.new(v) end end |