diff options
| author | Randy Morgan <[email protected]> | 2013-09-29 13:13:39 +0900 |
|---|---|---|
| committer | Randy Morgan <[email protected]> | 2013-09-29 13:13:39 +0900 |
| commit | 90fcca29df390de244e2b16ef0279fd373482981 (patch) | |
| tree | 6969b0470a2ea9ea43fa7f0d93f0701a0e2d5e9d /lib/axlsx/util/validators.rb | |
| parent | ce9819fcb2f9807ff1e9e68918e921f62aad2148 (diff) | |
| download | caxlsx-90fcca29df390de244e2b16ef0279fd373482981.tar.gz caxlsx-90fcca29df390de244e2b16ef0279fd373482981.zip | |
add validation for Worksheet#state and WorkbookView#visibility
Diffstat (limited to 'lib/axlsx/util/validators.rb')
| -rw-r--r-- | lib/axlsx/util/validators.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/axlsx/util/validators.rb b/lib/axlsx/util/validators.rb index a161f0d9..bdea6a1d 100644 --- a/lib/axlsx/util/validators.rb +++ b/lib/axlsx/util/validators.rb @@ -297,4 +297,10 @@ module Axlsx def self.validate_display_blanks_as(v) RestrictionValidator.validate :display_blanks_as, [:gap, :span, :zero], v end + + # Requires that the value is one of :visible, :hidden, :very_hidden + def self.validate_view_visibility(v) + RestrictionValidator.validate :visibility, [:visible, :hidden, :very_hidden], v + end + end |
