module Docxi::Word::Helpers
Public Instance Methods
br(options={})
click to toggle source
# File lib/docxi/word/helpers.rb, line 17 def br(options={}) element = Docxi::Word::Contents::Break.new(options) @content << element element end
frame(text, options={})
click to toggle source
# File lib/docxi/word/helpers.rb, line 11 def frame(text, options={}) p(options) do |p| p.frame text end end
p(options={}, &block)
click to toggle source
# File lib/docxi/word/helpers.rb, line 29 def p(options={}, &block) element = Docxi::Word::Contents::Paragraph.new(options, &block) @content << element element end
tab(options={})
click to toggle source
# File lib/docxi/word/helpers.rb, line 23 def tab(options={}) element = Docxi::Word::Contents::Tab.new(options) @content << element element end
table(options={}, &block)
click to toggle source
# File lib/docxi/word/helpers.rb, line 41 def table(options={}, &block) table = Docxi::Word::Contents::Table.new(options, &block) @content << table table end
table_of_content(options={}, &block)
click to toggle source
# File lib/docxi/word/helpers.rb, line 35 def table_of_content(options={}, &block) toc = Docxi::Word::Contents::TableOfContent.new(options, &block) @content << toc toc end
text(text, options={})
click to toggle source
# File lib/docxi/word/helpers.rb, line 5 def text(text, options={}) p(options) do |p| p.text text end end