Class: Alf::Engine::Compact::Set

Inherits:
Object
  • Object
show all
Includes:
Alf::Engine::Cog
Defined in:
lib/alf-engine/alf/engine/compact/set.rb

Overview

Remove duplicate tuples through an in-memory ‘to_set` heuristics.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Alf::Engine::Cog

#each, #to_dot, #to_relation

Constructor Details

#initialize(operand) ⇒ Set

Creates a Compact::Set instance



13
14
15
# File 'lib/alf-engine/alf/engine/compact/set.rb', line 13

def initialize(operand)
  @operand = operand
end

Instance Attribute Details

#operandEnumerable (readonly)

Returns The operand.

Returns:

  • (Enumerable)

    The operand



10
11
12
# File 'lib/alf-engine/alf/engine/compact/set.rb', line 10

def operand
  @operand
end

Instance Method Details

#_each(&block) ⇒ Object



18
19
20
# File 'lib/alf-engine/alf/engine/compact/set.rb', line 18

def _each(&block)
  operand.to_set.each(&block)
end