Module: DocxGenerator::Word::Extensions

Defined in:
lib/docx_generator/word/extensions.rb

Overview

Extensions to create some common elements easily.

Defined Under Namespace

Classes: Newline, NoSpace, Tab

Class Method Summary collapse

Class Method Details

.newlineObject



10
11
12
# File 'lib/docx_generator/word/extensions.rb', line 10

def self.newline
	DocxGenerator::Word::Run.new({}, [DocxGenerator::Word::Break.new])
end

.spaceObject



6
7
8
# File 'lib/docx_generator/word/extensions.rb', line 6

def self.space
  DocxGenerator::Word::Run.new({}, [DocxGenerator::Word::Text.new({ "xml:space" => "preserve" }, [" "])])
end