Class: ORTools::Comparison

Inherits:
Object
  • Object
show all
Defined in:
lib/or_tools/comparison.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(operator, left, right) ⇒ Comparison

Returns a new instance of Comparison.



5
6
7
8
9
# File 'lib/or_tools/comparison.rb', line 5

def initialize(operator, left, right)
  @operator = operator
  @left = left
  @right = right
end

Instance Attribute Details

#leftObject (readonly)

Returns the value of attribute left.



3
4
5
# File 'lib/or_tools/comparison.rb', line 3

def left
  @left
end

#operatorObject (readonly)

Returns the value of attribute operator.



3
4
5
# File 'lib/or_tools/comparison.rb', line 3

def operator
  @operator
end

#rightObject (readonly)

Returns the value of attribute right.



3
4
5
# File 'lib/or_tools/comparison.rb', line 3

def right
  @right
end

Instance Method Details

#inspectObject



11
12
13
# File 'lib/or_tools/comparison.rb', line 11

def inspect
  "#{left.inspect} #{operator} #{right.inspect}"
end