lib/codebreaker_kirill/validations.rb in codebreaker_kirill-1.0.2 vs lib/codebreaker_kirill/validations.rb in codebreaker_kirill-1.1.0

- old
+ new

@@ -14,10 +14,10 @@ raise 'Guess shouldn\'t be more than 4 characters long' if guess.length > 4 end def self.validate_difficulty(difficulty) raise "Input shouldn't be empty" if difficulty.empty? - return if difficulty.match?(/easy|medium|hell/) + return if Settings::DIFFICULTY.keys.include?(difficulty) raise 'You should enter one of the following options: easy, medium, hell' end end