Sha256: 4665169b4f748b70c21d8ed08d4cedeb8ced63234ded6fe22f19d4c021cf9541

Contents?: true

Size: 593 Bytes

Versions: 5

Compression:

Stored size: 593 Bytes

Contents

module Alf
  module Engine
    #
    # Remove duplicate tuples from its operand.
    #
    class Compact
      include Cog

      # @return [Enumerable] The operand
      attr_reader :operand

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

      # (see Cog#each)
      def _each(&block)
        Compact::Uniq.new(operand, expr).each(&block)
      end

    end # class Compact
  end # module Engine
end # module Alf
require_relative 'compact/uniq'
require_relative 'compact/set'

Version data entries

5 entries across 5 versions & 1 rubygems

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