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.
140 141 142 |
# File 'lib/ast.rb', line 140 def initialize(left,right) super(left,right) end |
Instance Method Details
#evaluate ⇒ Object
144 145 146 |
# File 'lib/ast.rb', line 144 def evaluate @left.evaluate%@right.evaluate end |