Sha256: 9d40f6171b7432c4d98455459604899a347762b75a913fcfe6616319e52afe01
Contents?: true
Size: 272 Bytes
Versions: 1
Compression:
Stored size: 272 Bytes
Contents
module CodebreakerApi PATH = './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
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
codebreaker-engine-0.1.7 | lib/codebreaker/codebreaker_api.rb |