summaryrefslogtreecommitdiffhomepage
path: root/lib/axlsx/workbook/worksheet/cell.rb
diff options
context:
space:
mode:
authorZsolt Kozaroczy <[email protected]>2023-05-22 10:38:49 +0200
committerGitHub <[email protected]>2023-05-22 10:38:49 +0200
commit6752225bbb8a9eec905ec02a98f1a25a309c404a (patch)
tree452abd7854a77d57805535c52e7abeaba5e0a573 /lib/axlsx/workbook/worksheet/cell.rb
parent6ae97de9c2bb45631d4d3de9ba890510e70623fb (diff)
parent6909ffbacf9dbfe7bfb01712ca7c47a3ca882dac (diff)
downloadcaxlsx-6752225bbb8a9eec905ec02a98f1a25a309c404a.tar.gz
caxlsx-6752225bbb8a9eec905ec02a98f1a25a309c404a.zip
Merge pull request #236 from pkmiec/smallPerfTweaks
Add `Cell#style_str` so that we can directly return '0'
Diffstat (limited to 'lib/axlsx/workbook/worksheet/cell.rb')
-rw-r--r--lib/axlsx/workbook/worksheet/cell.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/axlsx/workbook/worksheet/cell.rb b/lib/axlsx/workbook/worksheet/cell.rb
index c978bde4..49afa485 100644
--- a/lib/axlsx/workbook/worksheet/cell.rb
+++ b/lib/axlsx/workbook/worksheet/cell.rb
@@ -80,6 +80,11 @@ module Axlsx
defined?(@style) ? @style : 0
end
+ # Internal
+ def style_str
+ defined?(@style) ? @style.to_s : '0'
+ end
+
attr_accessor :raw_style
# The index of the cellXfs item to be applied to this cell.