'./db/data.yml'.freeze
9 10 11 12 13
# File 'lib/codebreaker/stats_storage.rb', line 9 def add(stat) stats = load stats << stat save(stats) end
5 6 7
# File 'lib/codebreaker/stats_storage.rb', line 5 def load File.file?(PATH) ? YAML.load_file(PATH) : [] end