Class: DocxGenerator::Word::Tab
- Defined in:
- lib/docx_generator/word/formatting.rb
Overview
Represent the ‘w:tab` element from Office Open XML specification. This class should not be used directly by the users of the library.
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ Tab
constructor
Create a new ‘w:tab` element.
Methods inherited from Element
Constructor Details
#initialize(options = {}) ⇒ Tab
Create a new ‘w:tab` element.
111 112 113 114 115 116 117 118 119 120 121 |
# File 'lib/docx_generator/word/formatting.rb', line 111 def initialize( = {}) final_arguments = {} .each do |name, value| if name.to_s == "pos" final_arguments["w:pos"] = (value * 20).round else final_arguments["w:" + name.to_s] = value end end super("w:tab", final_arguments) end |