Class: Coradoc::Html::Drop::TableCellDrop
- Inherits:
-
Base
- Object
- Liquid::Drop
- Base
- Coradoc::Html::Drop::TableCellDrop
show all
- Defined in:
- lib/coradoc/html/drop/table_cell_drop.rb
Instance Attribute Summary
Attributes inherited from Base
#model
Instance Method Summary
collapse
Methods inherited from Base
#id, #initialize, #template_type, #title, #to_liquid
Instance Method Details
#colspan ⇒ Object
15
16
17
|
# File 'lib/coradoc/html/drop/table_cell_drop.rb', line 15
def colspan
@model.colspan&.to_s
end
|
#content ⇒ Object
27
28
29
|
# File 'lib/coradoc/html/drop/table_cell_drop.rb', line 27
def content
content_to_liquid(@model.renderable_content)
end
|
7
8
9
|
# File 'lib/coradoc/html/drop/table_cell_drop.rb', line 7
def
@model. == true
end
|
#html_tag ⇒ Object
11
12
13
|
# File 'lib/coradoc/html/drop/table_cell_drop.rb', line 11
def html_tag
? 'th' : 'td'
end
|
#rowspan ⇒ Object
19
20
21
|
# File 'lib/coradoc/html/drop/table_cell_drop.rb', line 19
def rowspan
@model.rowspan&.to_s
end
|
#style ⇒ Object
23
24
25
|
# File 'lib/coradoc/html/drop/table_cell_drop.rb', line 23
def style
"text-align: #{@model.alignment}" if @model.alignment
end
|