Class: MiniKraken::Core::Goal

Inherits:
ParametrizedTerm show all
Defined in:
lib/mini_kraken/core/goal.rb

Instance Attribute Summary

Attributes inherited from ParametrizedTerm

#actuals, #specification

Instance Method Summary collapse

Methods inherited from ParametrizedTerm

#dup_cond, #initialize, #initialize_copy

Methods inherited from Term

#dup_cond

Constructor Details

This class inherits a constructor from MiniKraken::Core::ParametrizedTerm

Instance Method Details

#achieve(ctx) ⇒ Fiber<Context>

Attempt to obtain one or more solutions for the goal in a given context.

Parameters:

  • ctx (Core::Context)

    The context in which the goal takes place.

Returns:

  • (Fiber<Context>)

    A Fiber object that will generate the results.



14
15
16
# File 'lib/mini_kraken/core/goal.rb', line 14

def achieve(ctx)
  relation.solver_for(actuals, ctx)
end