Class: ORTools::Comparison
- Inherits:
-
Object
- Object
- ORTools::Comparison
- Defined in:
- lib/or_tools/comparison.rb
Instance Attribute Summary collapse
-
#left ⇒ Object
readonly
Returns the value of attribute left.
-
#operator ⇒ Object
readonly
Returns the value of attribute operator.
-
#right ⇒ Object
readonly
Returns the value of attribute right.
Instance Method Summary collapse
-
#initialize(operator, left, right) ⇒ Comparison
constructor
A new instance of Comparison.
- #inspect ⇒ Object
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
#left ⇒ Object (readonly)
Returns the value of attribute left.
3 4 5 |
# File 'lib/or_tools/comparison.rb', line 3 def left @left end |
#operator ⇒ Object (readonly)
Returns the value of attribute operator.
3 4 5 |
# File 'lib/or_tools/comparison.rb', line 3 def operator @operator end |
#right ⇒ Object (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
#inspect ⇒ Object
11 12 13 |
# File 'lib/or_tools/comparison.rb', line 11 def inspect "#{left.inspect} #{operator} #{right.inspect}" end |