Sha256: ac14abeeb54110ccd7f717614beee63dcc83d5fbb352bd7c42d711daafdde94e
Contents?: true
Size: 271 Bytes
Versions: 6
Compression:
Stored size: 271 Bytes
Contents
require 'yaml' module Chicanery module Persistence def persist state File.open 'state', 'w' do |file| file.puts state.to_yaml end end def restore return {} unless File.exist? 'state' YAML.load_file 'state' end end end
Version data entries
6 entries across 6 versions & 1 rubygems