Class: PureDocx::XmlGenerators::Row

Inherits:
Base
  • Object
show all
Defined in:
lib/puredocx/xml_generators/row.rb

Instance Attribute Summary collapse

Attributes inherited from Base

#content, #rels_constructor

Instance Method Summary collapse

Methods inherited from Base

#xml

Constructor Details

#initialize(content, rels_constructor, arguments = {}) ⇒ Row

Returns a new instance of Row.



6
7
8
9
# File 'lib/puredocx/xml_generators/row.rb', line 6

def initialize(content, rels_constructor, arguments = {})
  super(content, rels_constructor)
  @cells_width = arguments[:cells_width]
end

Instance Attribute Details

#cells_widthObject (readonly)

Returns the value of attribute cells_width.



4
5
6
# File 'lib/puredocx/xml_generators/row.rb', line 4

def cells_width
  @cells_width
end

Instance Method Details

#paramsObject



15
16
17
# File 'lib/puredocx/xml_generators/row.rb', line 15

def params
  { '{CELLS}' => cells }
end

#templateObject



11
12
13
# File 'lib/puredocx/xml_generators/row.rb', line 11

def template
  File.read(DocArchive.template_path('table/rows.xml'))
end