module CodebreakerGame::Storage

Constants

STAT_FILE

Public Instance Methods

flush() click to toggle source
# File lib/codebreaker_game/storage.rb, line 13
def flush
  File.delete(STAT_FILE) if storage_exists?
end
new_store(filename = STAT_FILE) click to toggle source
# File lib/codebreaker_game/storage.rb, line 17
def new_store(filename = STAT_FILE)
  YAML::Store.new(filename)
end
storage_exists?() click to toggle source
# File lib/codebreaker_game/storage.rb, line 5
def storage_exists?
  File.exist? STAT_FILE
end
storage_file() click to toggle source
# File lib/codebreaker_game/storage.rb, line 9
def storage_file
  STAT_FILE
end