diff options
| author | Geremia Taglialatela <[email protected]> | 2023-04-05 17:37:28 +0200 |
|---|---|---|
| committer | Geremia Taglialatela <[email protected]> | 2023-04-06 09:55:31 +0200 |
| commit | a802d1d179f5ab56b419e1b47e62885d72b5384d (patch) | |
| tree | 70e8cc79f12a4e17efb6dc0126cc0ed204669142 /lib/axlsx/util/validators.rb | |
| parent | b5d7a7a1917adb12e3ea04abe261a37f8aff7f56 (diff) | |
| download | caxlsx-a802d1d179f5ab56b419e1b47e62885d72b5384d.tar.gz caxlsx-a802d1d179f5ab56b419e1b47e62885d72b5384d.zip | |
Fix Layout/EmptyLineBetweenDefs offenses
```
rubocop --only Layout/EmptyLineBetweenDefs -a
```
Diffstat (limited to 'lib/axlsx/util/validators.rb')
| -rw-r--r-- | lib/axlsx/util/validators.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/axlsx/util/validators.rb b/lib/axlsx/util/validators.rb index 9e3d0de1..ebf8a280 100644 --- a/lib/axlsx/util/validators.rb +++ b/lib/axlsx/util/validators.rb @@ -31,6 +31,7 @@ module Axlsx raise ArgumentError, (ERR_RANGE % [value.inspect, min.to_s, max.to_s, inclusive]) unless passes end end + # Validates the value against the regular expression provided. class RegexValidator # @param [String] name The name of what is being validated. This is included in the output when the value is invalid @@ -142,6 +143,7 @@ module Axlsx def self.validate_page_orientation(v) RestrictionValidator.validate "page_orientation", [:default, :landscape, :portrait], v end + # Requires that the value is one of :none, :single, :double, :singleAccounting, :doubleAccounting def self.validate_cell_u(v) RestrictionValidator.validate "cell run style u", [:none, :single, :double, :singleAccounting, :doubleAccounting], v @@ -151,6 +153,7 @@ module Axlsx def self.validate_family(v) RestrictionValidator.validate "cell run style family", 1..5, v end + # Requires that the value is valid pattern type. # valid pattern types must be one of :none, :solid, :mediumGray, :darkGray, :lightGray, :darkHorizontal, :darkVertical, :darkDown, # :darkUp, :darkGrid, :darkTrellis, :lightHorizontal, :lightVertical, :lightDown, :lightUp, :lightGrid, :lightTrellis, :gray125, or :gray0625. @@ -213,6 +216,7 @@ module Axlsx def self.validate_scatter_style(v) Axlsx::RestrictionValidator.validate "ScatterChart.scatterStyle", [:none, :line, :lineMarker, :marker, :smooth, :smoothMarker], v.to_sym end + # Requires that the value is a valid horizontal_alignment # :general, :left, :center, :right, :fill, :justify, :centerContinuous, :distributed are allowed # @param [Any] v The value validated |
