diff options
Diffstat (limited to 'lib/axlsx/workbook')
| -rw-r--r-- | lib/axlsx/workbook/workbook.rb | 2 | ||||
| -rw-r--r-- | lib/axlsx/workbook/worksheet/border_creator.rb | 2 | ||||
| -rw-r--r-- | lib/axlsx/workbook/worksheet/worksheet.rb | 6 |
3 files changed, 5 insertions, 5 deletions
diff --git a/lib/axlsx/workbook/workbook.rb b/lib/axlsx/workbook/workbook.rb index e6e2f06f..271d4300 100644 --- a/lib/axlsx/workbook/workbook.rb +++ b/lib/axlsx/workbook/workbook.rb @@ -197,7 +197,7 @@ module Axlsx # A helper to apply styles that were added using `worksheet.add_style` # @return [Boolean] def apply_styles - return false if !styled_cells + return false unless styled_cells styled_cells.each do |cell| current_style = styles.style_index[cell.style] diff --git a/lib/axlsx/workbook/worksheet/border_creator.rb b/lib/axlsx/workbook/worksheet/border_creator.rb index 9abaded5..04a9cfac 100644 --- a/lib/axlsx/workbook/worksheet/border_creator.rb +++ b/lib/axlsx/workbook/worksheet/border_creator.rb @@ -17,7 +17,7 @@ module Axlsx else @edges = @edges.map { |x| x&.to_sym }.uniq - if !(@edges - Axlsx::Border::EDGES).empty? + unless (@edges - Axlsx::Border::EDGES).empty? raise ArgumentError, "Invalid edges provided, #{edges}" end end diff --git a/lib/axlsx/workbook/worksheet/worksheet.rb b/lib/axlsx/workbook/worksheet/worksheet.rb index f2587edb..29a22db1 100644 --- a/lib/axlsx/workbook/worksheet/worksheet.rb +++ b/lib/axlsx/workbook/worksheet/worksheet.rb @@ -584,7 +584,7 @@ module Axlsx # @param [String|Array] cell_refs Cell references # @param [Hash] styles def add_style(cell_refs, *styles) - if !cell_refs.is_a?(Array) + unless cell_refs.is_a?(Array) cell_refs = [cell_refs] end @@ -613,7 +613,7 @@ module Axlsx border_edges = options end - if !cell_refs.is_a?(Array) + unless cell_refs.is_a?(Array) cell_refs = [cell_refs] end @@ -850,7 +850,7 @@ module Axlsx end def add_autofilter_defined_name_to_workbook - return if !auto_filter.range + return unless auto_filter.range workbook.add_defined_name auto_filter.defined_name, name: '_xlnm._FilterDatabase', local_sheet_id: index, hidden: 1 end |
