diff options
| author | Paul Kmiec <[email protected]> | 2023-05-15 17:04:59 -0700 |
|---|---|---|
| committer | Paul Kmiec <[email protected]> | 2023-05-15 17:04:59 -0700 |
| commit | 1201ef7145463a14d263a093d7d53a2f235e48e0 (patch) | |
| tree | c4e60b2bd74fb22fb93e3bad1cef15f7bdc4e244 /lib/axlsx/util/validators.rb | |
| parent | 447b2522bc4a06c8436e708eae40cf7244dc0ec4 (diff) | |
| download | caxlsx-1201ef7145463a14d263a093d7d53a2f235e48e0.tar.gz caxlsx-1201ef7145463a14d263a093d7d53a2f235e48e0.zip | |
Remove ability to set `u=` to true in favor of :single
The `u=` would convert `true` to `:single` for backwards compatibility.
However, it is more explicit to set it to `:single` or one of the other
underline options instead of relying on the conversion.
Diffstat (limited to 'lib/axlsx/util/validators.rb')
| -rw-r--r-- | lib/axlsx/util/validators.rb | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/axlsx/util/validators.rb b/lib/axlsx/util/validators.rb index 752ffc76..e9cf13b6 100644 --- a/lib/axlsx/util/validators.rb +++ b/lib/axlsx/util/validators.rb @@ -107,9 +107,7 @@ module Axlsx end VALID_BOOLEAN_CLASSES = [TrueClass, FalseClass, Integer, String, Symbol].freeze - VALID_BOOLEAN_TRUE_VALUES = [true, 1, '1', 'true', :true].freeze - VALID_BOOLEAN_FALSE_VALUES = [false, 0, '0', 'false', :false].freeze - VALID_BOOLEAN_VALUES = VALID_BOOLEAN_TRUE_VALUES.zip(VALID_BOOLEAN_FALSE_VALUES).flatten.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. |
