Example #1
0
def to_ruby(self, schema):
    value = self.term.to_ruby(schema)
    if value.expr or value.i:
        return TRUE.to_ruby(schema)
    else:
        return Ruby(miss=FALSE,
                    type=BOOLEAN,
                    expr="(" + value.expr + ") instanceof java.lang.Double",
                    frum=self)
Example #2
0
def to_ruby(self, schema):
    if not self.terms:
        return TRUE.to_ruby()
    else:
        return Ruby(miss=FALSE,
                    type=BOOLEAN,
                    expr=" && ".join("(" + t.to_ruby(schema).expr + ")"
                                     for t in self.terms),
                    frum=self)