lib/alex_codebreaker/session.rb in alex_codebreaker-0.2.2 vs lib/alex_codebreaker/session.rb in alex_codebreaker-0.2.3
- old
+ new
@@ -2,11 +2,11 @@
class Session
include AlexCodebreaker::Modules::ArgumentsValidation
INITIAL_ATTEMPTS_USED = 0
INITIAL_HINTS_USED = 0
- WINNERS_FILE_NAME = 'winners.yml'.freeze
+ WINNERS_FILE_NAME = '/winners.yml'.freeze
attr_reader :hints_used, :attempts_used, :player_name, :hints_total,
:difficulty_name, :attempts_total, :difficulty_level, :time
def initialize
@@ -41,10 +41,10 @@
end
def save_winner_statistic
@time = Time.new
check_folder_existence
- path = "#{AlexCodebreaker.configuration.winners_folder_path}/#{WINNERS_FILE_NAME}"
+ path = "#{AlexCodebreaker.configuration.winners_folder_path}#{WINNERS_FILE_NAME}"
File.open(path, 'a') { |file| file.write(to_yaml) }
end
private