Ruby abstraction layer for math expresions