write_xlsx 1.10.1 → 1.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -13,7 +13,19 @@ module Writexlsx
13
13
 
14
14
  def initialize(*args)
15
15
  # Check for a cell reference in A1 notation and substitute row and column.
16
- row1, col1, row2, col2, options = row_col_notation(args)
16
+ if (row_col_array = row_col_notation(args.first))
17
+ case row_col_array.size
18
+ when 2
19
+ row1, col1 = row_col_array
20
+ row2, col2, options = args[1..-1]
21
+ when 4
22
+ row1, col1, row2, col2 = row_col_array
23
+ options = args[1]
24
+ end
25
+ else
26
+ row1, col1, row2, col2, options = args
27
+ end
28
+
17
29
  if row2.respond_to?(:keys)
18
30
  options_to_instance_variable(row2.dup)
19
31
  row2 = row1