Class: Gecode::Constraints::SimpleExpressionStub
- Inherits:
-
ExpressionStub
- Object
- ExpressionStub
- Gecode::Constraints::SimpleExpressionStub
- Includes:
- LeftHandSideMethods
- Defined in:
- lib/gecoder/interface/constraints.rb
Overview
Describes an expression stub which includes left hand side methods and just sends models and parameters through a supplied block to construct the resulting expression.
Instance Method Summary collapse
-
#initialize(model, params, &block) ⇒ SimpleExpressionStub
constructor
The block provided is executed when the expression demanded by the left hand side methods is to be constructed.
Methods included from LeftHandSideMethods
Constructor Details
#initialize(model, params, &block) ⇒ SimpleExpressionStub
The block provided is executed when the expression demanded by the left hand side methods is to be constructed. The block should take two parameters: model and params (which have been updated with negate and so on). The block should return an expression.
348 349 350 351 |
# File 'lib/gecoder/interface/constraints.rb', line 348 def initialize(model, params, &block) super(model, params) @proc = block end |