Class: ModuloNode
- Inherits:
-
BinaryNode
- Object
- BinaryNode
- ModuloNode
- Defined in:
- lib/ast.rb
Instance Attribute Summary
Attributes inherited from BinaryNode
Instance Method Summary collapse
- #evaluate ⇒ Object
-
#initialize(left, right) ⇒ ModuloNode
constructor
A new instance of ModuloNode.
Constructor Details
#initialize(left, right) ⇒ ModuloNode
Returns a new instance of ModuloNode.
71 72 73 |
# File 'lib/ast.rb', line 71 def initialize(left, right) super(left, right) end |
Instance Method Details
#evaluate ⇒ Object
75 76 77 |
# File 'lib/ast.rb', line 75 def evaluate() return @left.evaluate() % @right.evaluate() end |