Class: PureDocx::XmlGenerators::Cell
- Defined in:
- lib/puredocx/xml_generators/cell.rb
Instance Attribute Summary collapse
-
#width ⇒ Object
readonly
Returns the value of attribute width.
Attributes inherited from Base
Instance Method Summary collapse
-
#initialize(content, rels_constructor, arguments = {}) ⇒ Cell
constructor
A new instance of Cell.
- #params ⇒ Object
- #template ⇒ Object
Methods inherited from Base
Constructor Details
#initialize(content, rels_constructor, arguments = {}) ⇒ Cell
Returns a new instance of Cell.
6 7 8 9 |
# File 'lib/puredocx/xml_generators/cell.rb', line 6 def initialize(content, rels_constructor, arguments = {}) super(content, rels_constructor) @width = arguments[:width] end |
Instance Attribute Details
#width ⇒ Object (readonly)
Returns the value of attribute width.
4 5 6 |
# File 'lib/puredocx/xml_generators/cell.rb', line 4 def width @width end |
Instance Method Details
#params ⇒ Object
15 16 17 18 19 20 |
# File 'lib/puredocx/xml_generators/cell.rb', line 15 def params { '{CONTENT}' => content[:column].map(&:chomp).join, '{WIDTH}' => width } end |
#template ⇒ Object
11 12 13 |
# File 'lib/puredocx/xml_generators/cell.rb', line 11 def template File.read(DocArchive.template_path('table/cells.xml')) end |