Use boolean comparators where it makes sense
This commit is contained in:
parent
dbdc7ae4aa
commit
118886344a
28 changed files with 60 additions and 60 deletions
|
|
@ -126,7 +126,7 @@ end
|
|||
def ask(question, answers = false)
|
||||
puts question
|
||||
input = STDIN.gets.chomp
|
||||
if input.blank? or (answers and !answers.include?(input))
|
||||
if input.blank? || (answers && !answers.include?(input))
|
||||
puts red "Your Input is not valid. Try again!"
|
||||
input = ask(question, answers)
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue