samples/fib.rb in ddmemoize-1.0.0a2 vs samples/fib.rb in ddmemoize-1.0.0a3
- old
+ new
@@ -1,13 +1,13 @@
# frozen_string_literal: true
require 'ddmemoize'
-TELEMETRY = DDTelemetry.new
+DDMemoize.enable_telemetry
class FibFast
- DDMemoize.activate(self, telemetry: TELEMETRY)
+ DDMemoize.activate(self)
memoized def fib(n)
case n
when 0
0
@@ -19,6 +19,6 @@
end
end
p FibFast.new.fib(1000)
-DDMemoize.print_telemetry(TELEMETRY)
+DDMemoize.print_telemetry