Class: DocxGenerator::Word::Bold

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

Overview

Represent the ‘w:b` 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(present = nil) ⇒ Bold

Create a new ‘w:b` element.

Parameters:

  • present (Boolean) (defaults to: nil)

    If bold should be applied to the text.



10
11
12
13
# File 'lib/docx_generator/word/formatting.rb', line 10

def initialize(present = nil)
  arguments = (present == nil ? {} : { "w:val" => present })
  super("w:b", arguments)
end