diff options
| author | Zsolt Kozaroczy <[email protected]> | 2023-05-31 10:56:36 +0200 |
|---|---|---|
| committer | GitHub <[email protected]> | 2023-05-31 10:56:36 +0200 |
| commit | e899d1dd0b913027cc017c180120ed24927faf0b (patch) | |
| tree | 6d1e835466bbb1e6cb43511460dd3fcdf856a45c /lib/axlsx/workbook/worksheet | |
| parent | 7c5dbbe6661ac13a3f02925ef06eccb21edaa859 (diff) | |
| parent | b7155f6956c24ca71929c3376a5658e0df425061 (diff) | |
| download | caxlsx-e899d1dd0b913027cc017c180120ed24927faf0b.tar.gz caxlsx-e899d1dd0b913027cc017c180120ed24927faf0b.zip | |
Merge pull request #267 from tagliala/chore/freeze-mutable-constants
Fix Style/MutableConstant offenses
Diffstat (limited to 'lib/axlsx/workbook/worksheet')
4 files changed, 5 insertions, 5 deletions
diff --git a/lib/axlsx/workbook/worksheet/auto_filter/filter_column.rb b/lib/axlsx/workbook/worksheet/auto_filter/filter_column.rb index 16096a52..e5c3ef77 100644 --- a/lib/axlsx/workbook/worksheet/auto_filter/filter_column.rb +++ b/lib/axlsx/workbook/worksheet/auto_filter/filter_column.rb @@ -28,7 +28,7 @@ module Axlsx serializable_attributes :col_id, :hidden_button, :show_button # Allowed filters - FILTERS = [:filters] # , :top10, :custom_filters, :dynamic_filters, :color_filters, :icon_filters] + FILTERS = [:filters].freeze # , :top10, :custom_filters, :dynamic_filters, :color_filters, :icon_filters] # Zero-based index indicating the AutoFilter column to which this filter information applies. # @return [Integer] diff --git a/lib/axlsx/workbook/worksheet/auto_filter/filters.rb b/lib/axlsx/workbook/worksheet/auto_filter/filters.rb index 38bafe85..95e1b885 100644 --- a/lib/axlsx/workbook/worksheet/auto_filter/filters.rb +++ b/lib/axlsx/workbook/worksheet/auto_filter/filters.rb @@ -24,7 +24,7 @@ module Axlsx serializable_attributes :blank, :calendar_type # Allowed calendar types - CALENDAR_TYPES = %w(gregorian gregorianUs gregorianMeFrench gregorianArabic hijri hebrew taiwan japan thai korea saka gregorianXlitEnglish gregorianXlitFrench none) + CALENDAR_TYPES = %w(gregorian gregorianUs gregorianMeFrench gregorianArabic hijri hebrew taiwan japan thai korea saka gregorianXlitEnglish gregorianXlitFrench none).freeze # Flag indicating whether to filter by blank. # @return [Boolean] @@ -157,7 +157,7 @@ module Axlsx serializable_attributes :date_time_grouping, :year, :month, :day, :hour, :minute, :second # Allowed date time groupings - DATE_TIME_GROUPING = %w(year month day hour minute second) + DATE_TIME_GROUPING = %w(year month day hour minute second).freeze # Grouping level # This must be one of year, month, day, hour, minute or second. diff --git a/lib/axlsx/workbook/worksheet/data_bar.rb b/lib/axlsx/workbook/worksheet/data_bar.rb index 27218423..0dcdc8a8 100644 --- a/lib/axlsx/workbook/worksheet/data_bar.rb +++ b/lib/axlsx/workbook/worksheet/data_bar.rb @@ -38,7 +38,7 @@ module Axlsx serializable_attributes :min_length, :max_length, :show_value # instance values that must be serialized as their own elements - e.g. not attributes. - CHILD_ELEMENTS = [:value_objects, :color] + CHILD_ELEMENTS = [:value_objects, :color].freeze # minLength attribute # The minimum length of the data bar, as a percentage of the cell width. diff --git a/lib/axlsx/workbook/worksheet/sheet_view.rb b/lib/axlsx/workbook/worksheet/sheet_view.rb index 73e7533e..b64920bb 100644 --- a/lib/axlsx/workbook/worksheet/sheet_view.rb +++ b/lib/axlsx/workbook/worksheet/sheet_view.rb @@ -50,7 +50,7 @@ module Axlsx :view, :top_left_cell, :color_id, :zoom_scale # instance values that must be serialized as their own elements - e.g. not attributes. - CHILD_ELEMENTS = [:pane, :selections] + CHILD_ELEMENTS = [:pane, :selections].freeze # The pane object for the sheet view # @return [Pane] |
