lib/codebreaker/validation.rb in codebreaker_dmitriev-0.2.0 vs lib/codebreaker/validation.rb in codebreaker_dmitriev-0.2.1

- old
+ new

@@ -1,13 +1,15 @@ -module Validation - def name_valid?(name) - name.length.between? 3, 20 - end +module Codebreaker + module Validation + def name_valid?(name) + name.length.between? 3, 20 + end - def guess_valid?(guess) - /^[1-6]{4}$/.match? guess - end + def guess_valid?(guess) + /^[1-6]{4}$/.match? guess + end - def difficult_valid?(level) - !Constants::DIFFICULTS[level.to_sym].nil? + def difficult_valid?(level) + !Constants::DIFFICULTS[level.to_sym].nil? + end end end