class NoBrainer::Criteria::Where::UnaryOperator
Public Instance Methods
simplify()
click to toggle source
# File lib/no_brainer/criteria/where.rb, line 253 def simplify simplified_clause = self.clause.simplify case simplified_clause when UnaryOperator then case [self.op, simplified_clause.op] when [:not, :not] then simplified_clause.clause else self.class.new(op, simplified_clause) end else self.class.new(op, simplified_clause) end end
to_rql(doc)
click to toggle source
# File lib/no_brainer/criteria/where.rb, line 266 def to_rql(doc) case op when :not then clause.to_rql(doc).not end end