diff options
| author | Zsolt Kozaroczy <[email protected]> | 2023-05-17 09:35:19 +0200 |
|---|---|---|
| committer | GitHub <[email protected]> | 2023-05-17 09:35:19 +0200 |
| commit | 39d63521bf58e319d26b4bb47b0a1b3fc1fd8ba9 (patch) | |
| tree | 5e8aabd317d5938d310f2dcd0d582130fa7f9416 /lib/axlsx/util | |
| parent | 57865b2f08ae301f4d6815211fba59fefafcec33 (diff) | |
| parent | 20a6b1bf081c04a3e9438d4ada2e818cc67d641a (diff) | |
| download | caxlsx-39d63521bf58e319d26b4bb47b0a1b3fc1fd8ba9.tar.gz caxlsx-39d63521bf58e319d26b4bb47b0a1b3fc1fd8ba9.zip | |
Merge branch 'master' into cacheColRef
Diffstat (limited to 'lib/axlsx/util')
| -rw-r--r-- | lib/axlsx/util/validators.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/axlsx/util/validators.rb b/lib/axlsx/util/validators.rb index 0004f51a..e9cf13b6 100644 --- a/lib/axlsx/util/validators.rb +++ b/lib/axlsx/util/validators.rb @@ -106,8 +106,8 @@ module Axlsx DataTypeValidator.validate :signed_int, Integer, v end - VALID_BOOLEAN_CLASSES = [String, Integer, Symbol, TrueClass, FalseClass].freeze - VALID_BOOLEAN_VALUES = [0, 1, 'true', 'false', :true, :false, true, false, '0', '1'].freeze + VALID_BOOLEAN_CLASSES = [TrueClass, FalseClass, Integer, String, Symbol].freeze + VALID_BOOLEAN_VALUES = [true, false, 1, 0, '1', '0', 'true', 'false', :true, :false].freeze BOOLEAN_VALIDATOR = lambda { |arg| VALID_BOOLEAN_VALUES.include?(arg) } # Requires that the value is a form that can be evaluated as a boolean in an xml document. |
