From 556f88322951b4a64c7bdf6f68f3e0a970940fb7 Mon Sep 17 00:00:00 2001 From: Victor Gama Date: Wed, 15 Feb 2023 11:41:22 -0300 Subject: Allow singular form 'validate_type' to be provided to Option --- lib/slop/option.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/slop/option.rb b/lib/slop/option.rb index 3afc93a..655b283 100644 --- a/lib/slop/option.rb +++ b/lib/slop/option.rb @@ -115,7 +115,7 @@ module Slop # be parsed into the desired type or does not conform to the expected type's # format def validate_type? - config[:validate_types] + config[:validate_type] || config[:validate_types] end # Returns all flags joined by a comma. Used by the help string. -- cgit v1.2.1