summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAbinoam P. Marques Jr <abinoam@gmail.com>2022-12-31 22:24:21 -0300
committerAbinoam P. Marques Jr <abinoam@gmail.com>2022-12-31 22:24:21 -0300
commitf147388e42c592cf2a6930956c6160970f519d04 (patch)
treebea23faca058f9ba76054a2c732c4819a861ebef
parent9577a874e8d296206d943f05cb415efa26521d36 (diff)
downloadhighline-f147388e42c592cf2a6930956c6160970f519d04.tar.gz
Disentangle check_range step
-rw-r--r--lib/highline/question/answer_converter.rb3
-rw-r--r--lib/highline/question_asker.rb1
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)