From f147388e42c592cf2a6930956c6160970f519d04 Mon Sep 17 00:00:00 2001 From: "Abinoam P. Marques Jr" Date: Sat, 31 Dec 2022 22:24:21 -0300 Subject: Disentangle check_range step --- lib/highline/question/answer_converter.rb | 3 +-- lib/highline/question_asker.rb | 1 + 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/highline/question/answer_converter.rb b/lib/highline/question/answer_converter.rb index a899586..6a4585c 100644 --- a/lib/highline/question/answer_converter.rb +++ b/lib/highline/question/answer_converter.rb @@ -9,7 +9,7 @@ class HighLine extend Forwardable def_delegators :@question, - :answer, :answer=, :check_range, + :answer, :answer=, :directory, :answer_type, :choices_complete # It should be initialized with a Question object. @@ -27,7 +27,6 @@ class HighLine # @return [Object] the converted answer. def convert self.answer = convert_by_answer_type if answer_type - check_range answer end diff --git a/lib/highline/question_asker.rb b/lib/highline/question_asker.rb index 03b3ff7..d28d36c 100644 --- a/lib/highline/question_asker.rb +++ b/lib/highline/question_asker.rb @@ -31,6 +31,7 @@ class HighLine raise NotValidQuestionError unless question.valid_answer? question.convert + question.check_range if question.confirm confirmation = @highline.send(:confirm, question) -- cgit v1.2.1