Class: Guruby::Constraint
- Inherits:
-
Object
- Object
- Guruby::Constraint
- Defined in:
- lib/guruby/constr.rb
Instance Attribute Summary collapse
-
#expression ⇒ Object
readonly
Returns the value of attribute expression.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#rhs ⇒ Object
readonly
Returns the value of attribute rhs.
-
#sense ⇒ Object
readonly
Returns the value of attribute sense.
Instance Method Summary collapse
-
#initialize(expr, sense, rhs, name = nil) ⇒ Constraint
constructor
A new instance of Constraint.
Constructor Details
#initialize(expr, sense, rhs, name = nil) ⇒ Constraint
Returns a new instance of Constraint.
5 6 7 8 9 10 |
# File 'lib/guruby/constr.rb', line 5 def initialize(expr, sense, rhs, name = nil) @expression = expr @sense = sense @rhs = rhs @name = name end |
Instance Attribute Details
#expression ⇒ Object (readonly)
Returns the value of attribute expression.
3 4 5 |
# File 'lib/guruby/constr.rb', line 3 def expression @expression end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
3 4 5 |
# File 'lib/guruby/constr.rb', line 3 def name @name end |
#rhs ⇒ Object (readonly)
Returns the value of attribute rhs.
3 4 5 |
# File 'lib/guruby/constr.rb', line 3 def rhs @rhs end |
#sense ⇒ Object (readonly)
Returns the value of attribute sense.
3 4 5 |
# File 'lib/guruby/constr.rb', line 3 def sense @sense end |