Class: Coradoc::Mirror::ReverseBuilder::TableCell

Inherits:
Base
  • Object
show all
Defined in:
lib/coradoc/mirror/reverse_builder.rb

Instance Attribute Summary

Attributes inherited from Base

#context

Instance Method Summary collapse

Methods inherited from Base

#apply_mark, #build_content, #build_inline_children, #build_node, #extract_text, #initialize, #inline_content, registers

Constructor Details

This class inherits a constructor from Coradoc::Mirror::ReverseBuilder::Base

Instance Method Details

#build(node) ⇒ Object



434
435
436
437
438
439
440
441
442
443
# File 'lib/coradoc/mirror/reverse_builder.rb', line 434

def build(node)
  attrs = node.attrs
  CoreModel::TableCell.new(
    content: extract_text(node),
    header: attrs&.header || false,
    colspan: attrs&.colspan,
    rowspan: attrs&.rowspan,
    alignment: attrs&.alignment
  )
end