Class: DocxGenerator::Word::Size

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

Overview

Represent the ‘w:sz` element from Office Open XML specification. This class should not be used directly by the users of the library.

Instance Method Summary collapse

Methods inherited from Element

#add, #generate

Constructor Details

#initialize(size) ⇒ Size

Create a new ‘w:sz` element.

Parameters:

  • size (Number)

    The size of the text (in points)



46
47
48
# File 'lib/docx_generator/word/formatting.rb', line 46

def initialize(size)
  super("w:sz", { "w:val" => size*2 })
end