Sha256: 235fd2cbb2ccc5100fc0e2e886dedd508d550223d0ac515951f1d38c328f6772

Contents?: true

Size: 630 Bytes

Versions: 4

Compression:

Stored size: 630 Bytes

Contents

module Alf
  module Engine
    #
    # Marker for leaf compiled nodes
    #
    class Leaf
      include Cog

      # The initial expression
      attr_reader :operand

      # Creates a Concat instance
      def initialize(operand, expr = nil, compiler = nil)
        super(expr, compiler)
        @operand = operand
      end

      # (see Cog#each)
      def _each
        operand.each do |tuple|
          yield(symbolize(tuple))
        end
      end

      def to_s
        "Leaf"
      end

      def inspect
        "Engine::Leaf(#{operand.inspect})"
      end

    end # class Leaf
  end # module Engine
end # module Alf

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
alf-core-0.16.3 lib/alf/engine/leaf.rb
alf-core-0.16.2 lib/alf/engine/leaf.rb
alf-core-0.16.1 lib/alf/engine/leaf.rb
alf-core-0.16.0 lib/alf/engine/leaf.rb