diff options
| author | Geremia Taglialatela <[email protected]> | 2023-04-08 11:55:52 +0200 |
|---|---|---|
| committer | Geremia Taglialatela <[email protected]> | 2023-04-08 11:55:52 +0200 |
| commit | 48f392fb7752f14153126e9d154b4f9e2eef8fa7 (patch) | |
| tree | 35e6e5052cb33a7cd5245df137c80d4ec7cb9346 /lib/axlsx/workbook/worksheet/cell.rb | |
| parent | 55526805cf28cc91a22df5811b26cd23bdefa8d3 (diff) | |
| download | caxlsx-48f392fb7752f14153126e9d154b4f9e2eef8fa7.tar.gz caxlsx-48f392fb7752f14153126e9d154b4f9e2eef8fa7.zip | |
Fix Layout/EmptyLineAfterGuardClause offenses
```
rubocop --only Layout/EmptyLineAfterGuardClause -a
```
Diffstat (limited to 'lib/axlsx/workbook/worksheet/cell.rb')
| -rw-r--r-- | lib/axlsx/workbook/worksheet/cell.rb | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/axlsx/workbook/worksheet/cell.rb b/lib/axlsx/workbook/worksheet/cell.rb index a9685dac..cc668208 100644 --- a/lib/axlsx/workbook/worksheet/cell.rb +++ b/lib/axlsx/workbook/worksheet/cell.rb @@ -351,6 +351,7 @@ module Axlsx Axlsx::validate_unsigned_int(v) count = styles.cellXfs.size raise ArgumentError, "Invalid cellXfs id" unless v < count + @style = v end @@ -465,6 +466,7 @@ module Axlsx # Utility method for setting inline style attributes def set_run_style(validator, attr, value) return unless INLINE_STYLES.include?(attr.to_sym) + Axlsx.send(validator, value) unless validator.nil? self.instance_variable_set :"@#{attr.to_s}", value @is_text_run = true @@ -512,6 +514,7 @@ module Axlsx # @see Axlsx#date1904 def cast_value(v) return v if v.is_a?(RichText) || v.nil? + case type when :date self.style = STYLE_DATE if self.style == 0 |
