Class: Amigo::InitialResult

Inherits:
Object show all
Includes:
Hamster::Immutable
Defined in:
lib/amigo/initial_result.rb

Constant Summary collapse

SOLUTIONS =
Hamster.list(Solution.new(Hamster.set, Hamster.hash))

Instance Method Summary collapse

Constructor Details

#initialize(variables, triples) ⇒ InitialResult

Returns a new instance of InitialResult.



16
17
18
19
# File 'lib/amigo/initial_result.rb', line 16

def initialize(variables, triples)
  @variables = variables
  @triples = triples
end

Instance Method Details

#add(where) ⇒ Object



21
22
23
# File 'lib/amigo/initial_result.rb', line 21

def add(where)
  JoinResult.new(@variables, @triples, where.select(@triples))
end

#solutionsObject



25
26
27
# File 'lib/amigo/initial_result.rb', line 25

def solutions
  SOLUTIONS
end