mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-09-25 01:16:31 +08:00
20 lines
380 B
Ruby
20 lines
380 B
Ruby
|
# frozen_string_literal: true
|
||
|
|
||
|
module Reports
|
||
|
class Docx
|
||
|
module TableHelper
|
||
|
def table_cell_alignment(cell_class)
|
||
|
if cell_class.include?('htCenter')
|
||
|
:center
|
||
|
elsif cell_class.include?('htRight')
|
||
|
:right
|
||
|
elsif cell_class.include?('htJustify')
|
||
|
:both
|
||
|
else
|
||
|
:left
|
||
|
end
|
||
|
end
|
||
|
end
|
||
|
end
|
||
|
end
|