Class: Guruby::Constraint

Inherits:
Object
  • Object
show all
Defined in:
lib/guruby/constr.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#expressionObject (readonly)

Returns the value of attribute expression.



3
4
5
# File 'lib/guruby/constr.rb', line 3

def expression
  @expression
end

#nameObject (readonly)

Returns the value of attribute name.



3
4
5
# File 'lib/guruby/constr.rb', line 3

def name
  @name
end

#rhsObject (readonly)

Returns the value of attribute rhs.



3
4
5
# File 'lib/guruby/constr.rb', line 3

def rhs
  @rhs
end

#senseObject (readonly)

Returns the value of attribute sense.



3
4
5
# File 'lib/guruby/constr.rb', line 3

def sense
  @sense
end