class Docxi::Word::Contents::Break
Attributes
options[RW]
Public Class Methods
new(options={})
click to toggle source
# File lib/docxi/word/contents/break.rb, line 8 def initialize(options={}) @options = options @options[:times] ||= 1 end
Public Instance Methods
render(xml)
click to toggle source
# File lib/docxi/word/contents/break.rb, line 13 def render(xml) if @options[:page] xml['w'].p do xml['w'].r do xml['w'].br( 'w:type' => "page" ) end end else @options[:times].times do xml['w'].r do xml['w'].br end end end end