Class: Gecode::BlockConstraint
- Inherits:
-
Constraint
- Object
- Constraint
- Gecode::BlockConstraint
- 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
-
#initialize(model, params, &block) ⇒ BlockConstraint
constructor
:nodoc:.
- #post ⇒ Object
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
#post ⇒ Object
237 238 239 |
# File 'lib/gecoder/interface/constraints.rb', line 237 def post @proc.call end |