diff options
| author | Jan-Hendrik Hühne <[email protected]> | 2012-06-06 12:31:41 +0200 |
|---|---|---|
| committer | Jan-Hendrik Hühne <[email protected]> | 2012-06-06 12:31:41 +0200 |
| commit | de43beb1424fa94bdafec759a50cbe627e701cfe (patch) | |
| tree | f16cf54ebf19defb8787f936a36defe9d4c90708 /lib/axlsx/util/validators.rb | |
| parent | aaac7558a4a5ca3b7a62d85202545662d17a296b (diff) | |
| download | caxlsx-de43beb1424fa94bdafec759a50cbe627e701cfe.tar.gz caxlsx-de43beb1424fa94bdafec759a50cbe627e701cfe.zip | |
Validator renameing.
Diffstat (limited to 'lib/axlsx/util/validators.rb')
| -rw-r--r-- | lib/axlsx/util/validators.rb | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/lib/axlsx/util/validators.rb b/lib/axlsx/util/validators.rb index 27d895e8..4f42b29c 100644 --- a/lib/axlsx/util/validators.rb +++ b/lib/axlsx/util/validators.rb @@ -109,7 +109,7 @@ module Axlsx end # Requires that the value is an integer ranging from 10 to 400. - def self.validate_page_scale(v) + def self.validate_scale_10_400(v) DataTypeValidator.validate "page_scale", [Fixnum, Integer], v, lambda { |arg| arg >= 10 && arg <= 400 } end @@ -238,4 +238,11 @@ module Axlsx def self.validate_data_validation_type(v) RestrictionValidator.validate :data_validation_type, [:custom, :data, :decimal, :list, :none, :textLength, :time, :whole], v end -end + + # Requires that the value is a valid sheet view type. + # valid types must be one of normal, page_break_preview, page_layout + # @param [Any] v The value validated + def self.validate_sheet_view_type(v) + RestrictionValidator.validate :sheet_view_type, [:normal, :page_break_preview, :page_layout], v + end +end
\ No newline at end of file |
