lib/delorean/debug.rb in delorean_lang-0.5.1 vs lib/delorean/debug.rb in delorean_lang-0.5.2

- old
+ new

@@ -1,22 +1,23 @@ +# frozen_string_literal: true + module Delorean class Debug @debug_set = Set[] @log_file = '/tmp/delorean.log' def self.set_log_file(f) @log_file = f end def self.log(obj) - File.open(@log_file, 'a+') { - |f| + File.open(@log_file, 'a+') do |f| f.write obj.inspect f.write "\n" - } + end end - def self.debug_set - @debug_set + class << self + attr_reader :debug_set end end end