class DocxGenerator::Word::Indentation
Represent the ‘w:indent` element from Office Open XML specification. This class should not be used directly by the users of the library.
Public Class Methods
new(arguments = {})
click to toggle source
Create a new ‘w:indent` element. @param properties [Hash] The different properties for the indentation. They can be found in the specification.
Calls superclass method
DocxGenerator::Element::new
# 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