# frozen_string_literal: true module AndriiCodebreaker class DbYaml class << self def load_file(path) File.open(path, 'r') do |filename| YAML.safe_load(filename) end end def save(user, path) File.open(path, 'a') { |f| YAML.dump(user, f) } end def load_file_stats(path) YAML.load_stream(File.open(path)) end end end end