Sha256: 4a9c2eaf5ca0f403f8e187ffa2f28872e9842c4f578454c9c782e1ddc7d1f668
Contents?: true
Size: 904 Bytes
Versions: 3
Compression:
Stored size: 904 Bytes
Contents
module AQL class Node class Operator # Base class for n-ary operators class Nary < self include Concord.new(:body) private # Emit node # # @return [undefined] # # @api private # def emit(buffer) local = body if local.length == 1 local.first.visit(buffer) return end emit_body(buffer) end # Emit body # # @rteturn [undefined] # # @api private # def emit_body(buffer) buffer.parentheses do buffer.delimited(body, " #{self.class::SYMBOL} ") end end # Nary and operator # # Only present to ease generation of join filters. # class And < self SYMBOL = :'&&' end end end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
aql-0.0.3 | lib/aql/node/operator/nary.rb |
aql-0.0.2 | lib/aql/node/operator/nary.rb |
aql-0.0.1 | lib/aql/node/operator/nary.rb |