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:
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
#post ⇒ Object
245 246 247 |
# File 'lib/gecoder/interface/constraints.rb', line 245 def post @proc.call end |