Class: Docx::Elements::Containers::TableColumn

Inherits:
Object
  • Object
show all
Includes:
Container, Element
Defined in:
lib/docx/containers/table_column.rb

Constant Summary

Constants included from Element

Element::DEFAULT_TAG

Instance Attribute Summary

Attributes included from Element

#node

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Element

#append_to, #copy, #html_tag, included, #insert_after, #insert_before, #parent, #parent_paragraph, #prepend_to

Methods included from Container

#blank!, #properties, #remove!

Constructor Details

#initialize(cell_nodes) ⇒ TableColumn

Returns a new instance of TableColumn.



15
16
17
18
19
# File 'lib/docx/containers/table_column.rb', line 15

def initialize(cell_nodes)
  @node = ''
  @properties_tag = ''
  @cells = cell_nodes.map { |c_node| Containers::TableCell.new(c_node) }
end

Class Method Details

.tagObject



11
12
13
# File 'lib/docx/containers/table_column.rb', line 11

def self.tag
  'w:gridCol'
end

Instance Method Details

#cellsObject

Array of cells contained within row



22
23
24
# File 'lib/docx/containers/table_column.rb', line 22

def cells
  @cells
end