Class: Gecode::Bool::ExpressionNode
- Inherits:
-
Object
- Object
- Gecode::Bool::ExpressionNode
- Defined in:
- lib/gecoder/interface/constraints/bool/boolean.rb
Overview
Describes a single node in a boolean expression.
Instance Attribute Summary collapse
-
#model ⇒ Object
readonly
:nodoc:.
Instance Method Summary collapse
-
#initialize(value, model = nil) ⇒ ExpressionNode
constructor
A new instance of ExpressionNode.
-
#to_minimodel_bool_expr ⇒ Object
Returns a MiniModel boolean expression representing the tree.
Constructor Details
#initialize(value, model = nil) ⇒ ExpressionNode
Returns a new instance of ExpressionNode.
237 238 239 240 241 242 243 244 |
# File 'lib/gecoder/interface/constraints/bool/boolean.rb', line 237 def initialize(value, model = nil) unless value.respond_to? :to_bool_var raise TypeError, 'Invalid type used in boolean equation: ' + "#{value.class}." end @value = value @model = model end |
Instance Attribute Details
#model ⇒ Object (readonly)
:nodoc:
235 236 237 |
# File 'lib/gecoder/interface/constraints/bool/boolean.rb', line 235 def model @model end |