Class: Operator
- Inherits:
-
Object
- Object
- Operator
- Defined in:
- lib/rast/rules/operator.rb
Overview
Operator Enum in Java. To be used only internally in RuleEvaluator class.
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Not(‘!’, Byte.MAX_VALUE), And(‘&’, (byte) 2), Or(‘|’, (byte) 1).
-
#precedence ⇒ Object
readonly
Not(‘!’, Byte.MAX_VALUE), And(‘&’, (byte) 2), Or(‘|’, (byte) 1).
-
#symbol ⇒ Object
readonly
Not(‘!’, Byte.MAX_VALUE), And(‘&’, (byte) 2), Or(‘|’, (byte) 1).
Instance Method Summary collapse
-
#initialize(name: '', symbol: '', precedence: -1)) ⇒ Operator
constructor
A new instance of Operator.
- #to_s ⇒ Object
Constructor Details
#initialize(name: '', symbol: '', precedence: -1)) ⇒ Operator
Returns a new instance of Operator.
9 10 11 12 13 |
# File 'lib/rast/rules/operator.rb', line 9 def initialize(name: '', symbol: '', precedence: -1) @name = name @symbol = symbol @precedence = precedence end |
Instance Attribute Details
#name ⇒ Object (readonly)
Not(‘!’, Byte.MAX_VALUE), And(‘&’, (byte) 2), Or(‘|’, (byte) 1)
7 8 9 |
# File 'lib/rast/rules/operator.rb', line 7 def name @name end |
#precedence ⇒ Object (readonly)
Not(‘!’, Byte.MAX_VALUE), And(‘&’, (byte) 2), Or(‘|’, (byte) 1)
7 8 9 |
# File 'lib/rast/rules/operator.rb', line 7 def precedence @precedence end |
#symbol ⇒ Object (readonly)
Not(‘!’, Byte.MAX_VALUE), And(‘&’, (byte) 2), Or(‘|’, (byte) 1)
7 8 9 |
# File 'lib/rast/rules/operator.rb', line 7 def symbol @symbol end |
Instance Method Details
#to_s ⇒ Object
15 16 17 |
# File 'lib/rast/rules/operator.rb', line 15 def to_s @operator.to_s end |