class PureDocx::XmlGenerators::Cell

Attributes

width[R]

Public Class Methods

new(content, rels_constructor, arguments = {}) click to toggle source
Calls superclass method PureDocx::XmlGenerators::Base::new
# File lib/puredocx/xml_generators/cell.rb, line 6
def initialize(content, rels_constructor, arguments = {})
  super(content, rels_constructor)
  @width = arguments[:width]
end

Public Instance Methods

params() click to toggle source
# File lib/puredocx/xml_generators/cell.rb, line 15
def params
  {
    '{CONTENT}' => content[:column].map(&:chomp).join,
    '{WIDTH}'   => width
  }
end
template() click to toggle source
# File lib/puredocx/xml_generators/cell.rb, line 11
def template
  File.read(DocArchive.template_path('table/cells.xml'))
end