Sha256: acb0efa0da57ccf60582ce8a7d3bf47705dbfdd657fd9be6fa7a6fb126af3b59
Contents?: true
Size: 250 Bytes
Versions: 202
Compression:
Stored size: 250 Bytes
Contents
module Arithmetic class BinaryOperation < Treetop::Runtime::SyntaxNode def eval(env={}) tail.elements.inject(head.eval(env)) do |value, element| element.operator.apply(value, element.operand.eval(env)) end end end end
Version data entries
202 entries across 187 versions & 30 rubygems