summaryrefslogtreecommitdiffhomepage
path: root/lib/axlsx/workbook/worksheet/cell.rb
diff options
context:
space:
mode:
authorGeremia Taglialatela <[email protected]>2023-06-15 09:30:29 +0200
committerGeremia Taglialatela <[email protected]>2023-06-15 09:30:29 +0200
commit988c79b8d7602c67f7b761269383129609cf63a7 (patch)
tree036d742dc625ea43028326d869a06e35ef9952b1 /lib/axlsx/workbook/worksheet/cell.rb
parente74c75b95d39fb51512387031e79f50e52a5874a (diff)
downloadcaxlsx-988c79b8d7602c67f7b761269383129609cf63a7.tar.gz
caxlsx-988c79b8d7602c67f7b761269383129609cf63a7.zip
Fix redundant self offenses
No performance gain, this can be seen as a cosmetic change to have shorter lines
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 67f84fbc..1e4eab78 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