Sha256: 1d3eab4d04e4f68ed96942b070c4a994a869d20212aa34f1763681ca52a91e40
Contents?: true
Size: 690 Bytes
Versions: 15
Compression:
Stored size: 690 Bytes
Contents
module Predicates module Where class WherePredicate attr_reader :predicates def initialize @predicates = empty end def where(predicates) @predicates = predicates.is_a?(Pair::Pair) ? @predicates.append(predicates) : @predicates.join(Pair.from_map(predicates)) self end def and(predicates) @predicates = predicates.is_a?(Pair::Pair) ? @predicates.append(predicates) : @predicates.join(Pair.from_map(predicates)) self end end def where(predicate_map) WherePredicate.new.where(predicate_map) end def is(single_predicate) pair(:self, single_predicate) end end end
Version data entries
15 entries across 15 versions & 1 rubygems