Sha256: ddfc1db7e45515ba38669970d670d7494d2c7815324f630fb9f603cd7187fa02

Contents?: true

Size: 516 Bytes

Versions: 5

Compression:

Stored size: 516 Bytes

Contents

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

      # @return [Enumerable] The operand
      attr_reader :operand

      # Creates a Compact instance
      def initialize(operand)
        @operand = operand
      end

      # (see Cog#each)
      def each(&block)
        Compact::Uniq.new(operand).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-0.12.2 lib/alf-engine/alf/engine/compact.rb
alf-0.12.1 lib/alf-engine/alf/engine/compact.rb
alf-0.12.0 lib/alf-engine/alf/engine/compact.rb
alf-0.11.1 lib/alf-engine/alf/engine/compact.rb
alf-0.11.0 lib/alf-engine/alf/engine/compact.rb