summaryrefslogtreecommitdiffhomepage
path: root/lib/axlsx/workbook/worksheet/cell.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/axlsx/workbook/worksheet/cell.rb')
-rw-r--r--lib/axlsx/workbook/worksheet/cell.rb10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/axlsx/workbook/worksheet/cell.rb b/lib/axlsx/workbook/worksheet/cell.rb
index 7f24c9b7..b8b4fea5 100644
--- a/lib/axlsx/workbook/worksheet/cell.rb
+++ b/lib/axlsx/workbook/worksheet/cell.rb
@@ -375,11 +375,11 @@ module Axlsx
# @param [Cell, String] target The last cell, or str ref for the cell in the merge range
def merge(target)
start, stop = if target.is_a?(String)
- [self.r, target]
+ [r, target]
elsif target.is_a?(Cell)
Axlsx.sort_cells([self, target]).map(&:r)
end
- self.row.worksheet.merge_cells "#{start}:#{stop}" unless stop.nil?
+ row.worksheet.merge_cells "#{start}:#{stop}" unless stop.nil?
end
# Serializes the cell
@@ -483,7 +483,7 @@ module Axlsx
return unless INLINE_STYLES.include?(attr.to_sym)
Axlsx.send(validator, value) unless validator.nil?
- self.instance_variable_set :"@#{attr}", value
+ instance_variable_set :"@#{attr}", value
@is_text_run = true
end
@@ -530,14 +530,14 @@ module Axlsx
case type
when :date
- self.style = STYLE_DATE if self.style.zero?
+ self.style = STYLE_DATE if style.zero?
if !v.is_a?(Date) && v.respond_to?(:to_date)
v.to_date
else
v
end
when :time
- self.style = STYLE_DATE if self.style.zero?
+ self.style = STYLE_DATE if style.zero?
if !v.is_a?(Time) && v.respond_to?(:to_time)
v.to_time
else