diff options
| author | Randy Morgan <[email protected]> | 2011-12-05 09:37:36 +0900 |
|---|---|---|
| committer | Randy Morgan <[email protected]> | 2011-12-05 09:37:36 +0900 |
| commit | 94fde022cbe253724a42e66d0f1e005dfcf6b2c0 (patch) | |
| tree | 19cffa8c3d51fe400b5b16c186c300fa832a6c6a /lib/axlsx/workbook/worksheet/row.rb | |
| parent | 362863fc352b0bba24c31693f63a434fb2cdbb7c (diff) | |
| download | caxlsx-94fde022cbe253724a42e66d0f1e005dfcf6b2c0.tar.gz caxlsx-94fde022cbe253724a42e66d0f1e005dfcf6b2c0.zip | |
adding in style overrides to cell.rb
Diffstat (limited to 'lib/axlsx/workbook/worksheet/row.rb')
| -rw-r--r-- | lib/axlsx/workbook/worksheet/row.rb | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/axlsx/workbook/worksheet/row.rb b/lib/axlsx/workbook/worksheet/row.rb index 7958124f..f5528f8b 100644 --- a/lib/axlsx/workbook/worksheet/row.rb +++ b/lib/axlsx/workbook/worksheet/row.rb @@ -93,11 +93,13 @@ module Axlsx def array_to_cells(values, options={}) values = values DataTypeValidator.validate 'Row.array_to_cells', Array, values - types, style = options[:types], options[:style] + types, style = options.delete(:types), options.delete(:style) values.each_with_index do |value, index| cell_style = style.is_a?(Array) ? style[index] : style + options[:style] = cell_style if cell_style cell_type = types.is_a?(Array)? types[index] : types - Cell.new(self, value, :style=>cell_style, :type=>cell_type) + options[:type] = cell_type if cell_type + Cell.new(self, value, options) end end end |
