module

NaiveMather

Calculates simple math equations, like "2 + 3 * (2 + 4)" Based on Ruby code written for blog by Lukasz Wrobel. https://lukaszwrobel.pl/blog/math-parser-part-3-implementation/

Constants

DEBUG = false
VERSION = "0.1.0"

Class methods

calculate(equation : String | Nil)

Returns the result of calculating the passed equation.

NativeMather.calculate("2 + 3") # => 5
Source

Nested types