class DocxGenerator::Word::Underline
Represent the ‘w:u` element from Office Open XML specification. This class should not be used directly by the users of the library.
Public Class Methods
new(arguments = { "w:val" => "single" })
click to toggle source
Create a new ‘w:u` element. @param arguments [Hash] Arguments for the `w:u` element. See the full list in the specification. You can use `style` instead of `w:val` if you want. The list of all underline patterns can be found in the specification.
Calls superclass method
DocxGenerator::Element::new
# File lib/docx_generator/word/formatting.rb, line 30 def initialize(arguments = { "w:val" => "single" }) final_arguments = {} arguments.each do |option, value| case option when :style then final_arguments["w:val"] = value else final_arguments[option] = value end end super("w:u", final_arguments) end