module Maths class Functions FUNCTIONS = { "sqrt" => Proc.new { |val| BigDecimal.new(Math.sqrt(val).to_s) } } def self.exec(function, value) FUNCTIONS[function].call(value) end end end