Sha256: a6a74594ba1ae70b45803e68721ee432fdce3701b95032153dd8935cc639d525

Contents?: true

Size: 401 Bytes

Versions: 1

Compression:

Stored size: 401 Bytes

Contents

module Dydx
  module API
    class << self
      def store_func(vars, formula, symbol)
        func_obj = Function.new(*vars)
        func_obj <=(formula)
        eval("$#{symbol.to_s} = func_obj")
      end

      def eval_func(nums, symbol)
        func = eval("$#{symbol.to_s}")
        func.evalue(nums)
      end

      def reset!
        $tmp, $temp_cal_f = nil, nil
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
dydx-0.2.7000001 lib/dydx/api.rb