diff options
| author | Weston Ganger <[email protected]> | 2022-10-09 14:40:24 -0700 |
|---|---|---|
| committer | Weston Ganger <[email protected]> | 2022-10-09 14:40:24 -0700 |
| commit | 03bad903f474fecccc7dacdc14ef17605d9e2aa2 (patch) | |
| tree | e0a88df15105a6c2d5dfda5c9178a428b280e6bf /lib/axlsx/workbook/workbook.rb | |
| parent | 99b25655ef0e5c953007ff81b5bc08058831da8c (diff) | |
| download | caxlsx-03bad903f474fecccc7dacdc14ef17605d9e2aa2.tar.gz caxlsx-03bad903f474fecccc7dacdc14ef17605d9e2aa2.zip | |
Improvements
Diffstat (limited to 'lib/axlsx/workbook/workbook.rb')
| -rw-r--r-- | lib/axlsx/workbook/workbook.rb | 17 |
1 files changed, 3 insertions, 14 deletions
diff --git a/lib/axlsx/workbook/workbook.rb b/lib/axlsx/workbook/workbook.rb index 417e15a3..ef56debd 100644 --- a/lib/axlsx/workbook/workbook.rb +++ b/lib/axlsx/workbook/workbook.rb @@ -188,7 +188,9 @@ require 'axlsx/workbook/worksheet/selection.rb' end # An array that holds all cells with styles - attr_accessor :styled_cells + def styled_cells + @styled_cells ||= Set.new + end # Checks if styles are indexed to make it work for pre 0.1.5 version # users that still explicitly call @workbook.apply_styles @@ -418,18 +420,5 @@ require 'axlsx/workbook/worksheet/selection.rb' str << '</workbook>' end - private - - # Utility method for performing a deep merge on a Hash - def hash_deep_merge(first_hash, second_hash) - first_hash.merge(second_hash) do |key, this_val, other_val| - if this_val.is_a?(Hash) && other_val.is_a?(Hash) - this_val.deep_merge(other_val, &block) - else - other_val - end - end - end - end end |
