Sha256: b3c23fb786eeb365669381fed022cad0c4376d01cdad82d02cd7651e63b68262

Contents?: true

Size: 636 Bytes

Versions: 3

Compression:

Stored size: 636 Bytes

Contents

module AQL
  # Abstract base class for AQL nodes
  class Node
    include Adamantium, AbstractType

    # Return source representation
    #
    # @return [String]
    #
    # @api private
    #
    def aql
      emitter = Buffer.new
      emit(emitter)
      emitter.content
    end
    memoize :aql

    # Visit node
    #
    # @param [Buffer] buffer
    #
    # @return [self]
    #
    # @api private
    #
    def visit(buffer)
      emit(buffer)
      self
    end

  private

    # Emit AQL
    #
    # @param [Emitter] emitter
    #
    # @return [undefined]
    #
    # @api private
    #
    abstract_method :emit

  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
aql-0.0.3 lib/aql/node.rb
aql-0.0.2 lib/aql/node.rb
aql-0.0.1 lib/aql/node.rb