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:



240
241
242
243
# File 'lib/gecoder/interface/constraints.rb', line 240

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

Instance Method Details

#postObject



245
246
247
# File 'lib/gecoder/interface/constraints.rb', line 245

def post
  @proc.call
end