Sha256: d5f7616d649b47c2cb71cbf2b1231509cb10c09810142e84d5bfddd03d2fc29b

Contents?: true

Size: 550 Bytes

Versions: 5

Compression:

Stored size: 550 Bytes

Contents

module Alf
  module Engine
    #
    # Remove duplicate tuples through an in-memory `to_set` heuristics.
    #
    class Compact::Set
      include Cog

      # @return [Enumerable] The operand
      attr_reader :operand

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

      # (see Cog#each)
      def _each(&block)
        operand.to_set.each(&block)
      end

    end # class Compact::Set
  end # module Engine
end # module Alf

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
alf-core-0.16.3 lib/alf/engine/compact/set.rb
alf-core-0.16.2 lib/alf/engine/compact/set.rb
alf-core-0.16.1 lib/alf/engine/compact/set.rb
alf-core-0.16.0 lib/alf/engine/compact/set.rb
alf-core-0.15.0 lib/alf/engine/compact/set.rb