Class: DocxGenerator::Word::Underline

Inherits:
Element
  • Object
show all
Defined in:
lib/docx_generator/word/formatting.rb

Instance Method Summary collapse

Methods inherited from Element

#add, #generate

Constructor Details

#initialize(arguments = { "w:val" => "single" }) ⇒ Underline

Returns a new instance of Underline.



18
19
20
21
22
23
24
25
26
27
# File 'lib/docx_generator/word/formatting.rb', line 18

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