Class: Gecode::BlockConstraint

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

Overview

A constraint that can be specified by providing a block containing the post method.

Instance Method Summary collapse

Constructor Details

#initialize(model, params, &block) ⇒ BlockConstraint

:nodoc:



232
233
234
235
# File 'lib/gecoder/interface/constraints.rb', line 232

def initialize(model, params, &block)
  super(model, params)
  @proc = block
end

Instance Method Details

#postObject



237
238
239
# File 'lib/gecoder/interface/constraints.rb', line 237

def post
  @proc.call
end