Class: Docxi::Word::Contents::Table::TableRow::TableCell::PageNumbers
- Inherits:
-
Object
- Object
- Docxi::Word::Contents::Table::TableRow::TableCell::PageNumbers
- Defined in:
- lib/docxi/word/contents/table.rb
Instance Attribute Summary collapse
-
#options ⇒ Object
Returns the value of attribute options.
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ PageNumbers
constructor
A new instance of PageNumbers.
- #render(xml) ⇒ Object
Constructor Details
#initialize(options = {}) ⇒ PageNumbers
Returns a new instance of PageNumbers.
254 255 256 |
# File 'lib/docxi/word/contents/table.rb', line 254 def initialize(={}) @options = end |
Instance Attribute Details
#options ⇒ Object
Returns the value of attribute options.
253 254 255 |
# File 'lib/docxi/word/contents/table.rb', line 253 def @options end |
Instance Method Details
#render(xml) ⇒ Object
258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 |
# File 'lib/docxi/word/contents/table.rb', line 258 def render(xml) xml['w'].sdt do xml['w'].sdtPr do xml['w'].id( 'w:val' => "-472213903" ) xml['w'].docPartObj do xml['w'].docPartGallery( 'w:val' => "Page Numbers (Bottom of Page)" ) xml['w'].docPartUnique end end xml['w'].sdtContent do xml['w'].p do xml['w'].pPr do xml['w'].jc( 'w:val' => @options[:align] || 'right' ) end xml['w'].r do xml['w'].rPr do xml['w'].rFonts( 'w:cs'=> 'Arial', 'w:ascii'=> 'Arial', 'w:hAnsi' => 'Arial' ) xml['w'].color( 'w:val' => '404040') xml['w'].sz( 'w:val' => '20' ) end xml['w'].t 'GlobalOptions ' end xml['w'].r do xml['w'].fldChar( 'w:fldCharType' => "begin" ) end xml['w'].r do xml['w'].instrText "PAGE \* MERGEFORMAT" end xml['w'].r do xml['w'].fldChar( 'w:fldCharType' => "separate" ) end xml['w'].r do xml['w'].fldChar( 'w:fldCharType' => "end" ) end end end end end |