Class: Gecode::Constraints::ExpressionStub

Inherits:
Object
  • Object
show all
Defined in:
lib/gecoder/interface/constraints.rb

Overview

Describes a constraint expression that has yet to be completed. I.e. a form of must has not yet been called, but some method has been called to initiate the expression. An example is distinct with offsets:

enum.with_offsets(0..n).must_be.distinct

The call of with_offsets initiates the constraint as a stub, even though must has not yet been called.

Instance Method Summary collapse

Constructor Details

#initialize(model, params) ⇒ ExpressionStub

Constructs a new expression with the specified parameters.



403
404
405
406
# File 'lib/gecoder/interface/constraints.rb', line 403

def initialize(model, params)
  @model = model
  @params = params
end