summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAbinoam P. Marques Jr <abinoam@gmail.com>2023-01-01 22:03:50 -0300
committerAbinoam P. Marques Jr <abinoam@gmail.com>2023-01-02 18:04:23 -0300
commitd58af89b5b82d44ddb1769acfaa92c2dc3758a26 (patch)
treed0acd39b4c2a399eff6ae26a1e5d71ee24f9d416
parent5b785aca521b1a38446819da3544a4e0b4c76779 (diff)
downloadhighline-d58af89b5b82d44ddb1769acfaa92c2dc3758a26.tar.gz
Update Question#validate inline documentation
-rw-r--r--lib/highline/question.rb3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/highline/question.rb b/lib/highline/question.rb
index 27d8491..8fcd68d 100644
--- a/lib/highline/question.rb
+++ b/lib/highline/question.rb
@@ -145,6 +145,9 @@ class HighLine
# If set to a Regexp, the answer must match (before type conversion).
# Can also be set to a Proc which will be called with the provided
# answer to validate with a +true+ or +false+ return.
+ # It's possible to use a custom validator class. It must respond to
+ # `#valid?`. The result of `#inspect` will be used in error messages.
+ # See README.md for details.
#
attr_accessor :validate
# Used to control range checks for answer.