Class: ModulNode
- Inherits:
-
BinaryNode
- Object
- BinaryNode
- ModulNode
- Defined in:
- lib/ast.rb
Instance Attribute Summary
Attributes inherited from BinaryNode
Instance Method Summary collapse
- #evaluate ⇒ Object
-
#initialize(left, right) ⇒ ModulNode
constructor
A new instance of ModulNode.
Constructor Details
#initialize(left, right) ⇒ ModulNode
Returns a new instance of ModulNode.
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 left.evaluate % right.evaluate end |