Class: DocxGenerator::Word::Indentation
- Defined in:
- lib/docx_generator/word/formatting.rb
Overview
Represent the ‘w:indent` element from Office Open XML specification. This class should not be used directly by the users of the library.
Instance Method Summary collapse
-
#initialize(arguments = {}) ⇒ Indentation
constructor
Create a new ‘w:indent` element.
Methods inherited from Element
Constructor Details
#initialize(arguments = {}) ⇒ Indentation
Create a new ‘w:indent` element.
82 83 84 85 86 87 88 89 90 91 92 |
# File 'lib/docx_generator/word/formatting.rb', line 82 def initialize(arguments = {}) final_arguments = {} arguments.each do |name, value| if name.to_s == "first_line" final_arguments["w:firstLine"] = (value * 20).round else final_arguments["w:" + name.to_s] = (value * 20).round end end super("w:ind", final_arguments) end |