Class: ModNode
- Inherits:
-
BinaryNode
- Object
- BinaryNode
- ModNode
- Defined in:
- lib/ast.rb
Instance Attribute Summary
Attributes inherited from BinaryNode
Instance Method Summary collapse
- #evaluate ⇒ Object
-
#initialize(left, right) ⇒ ModNode
constructor
A new instance of ModNode.
Constructor Details
#initialize(left, right) ⇒ ModNode
Returns a new instance of ModNode.
61 62 63 |
# File 'lib/ast.rb', line 61 def initialize(left,right) super(left,right) end |
Instance Method Details
#evaluate ⇒ Object
65 66 67 |
# File 'lib/ast.rb', line 65 def evaluate() return @left.evaluate() % @right.evaluate() end |