Sha256: 5718b99e43311b639a51178c2cc4e047eec3cf193d0aefc9abae3269f99e9479
Contents?: true
Size: 288 Bytes
Versions: 3
Compression:
Stored size: 288 Bytes
Contents
module CodebreakerApi PATH = './lib/codebreaker/stats.yml'.freeze def load(path = PATH) File.exist?(path) && Psych.load(File.read(path)) end def save(data, path = PATH) File.open(path, 'w') do |file| file.write(Psych.dump(data)) unless data.nil? end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
codebreaker-engine-0.1.5 | lib/codebreaker/codebreaker_api.rb |
codebreaker-engine-0.1.4 | lib/codebreaker/codebreaker_api.rb |
codebreaker-engine-0.1.3 | lib/codebreaker/codebreaker_api.rb |