Class: Docxtor2::Package::Document::Heading

Inherits:
Paragraph show all
Defined in:
lib/docxtor2/package/document/heading.rb

Constant Summary collapse

H1 =
1
H2 =
2

Instance Method Summary collapse

Methods inherited from Paragraph

#line_break, #preserve_whitespace, #render, #write

Methods inherited from Element

#render

Methods included from ObjectUtils

#find_argument

Methods included from BlockEvaluator

#evaluate

Methods inherited from ElementList

map

Constructor Details

#initialize(nesting = H1, *args, &block) ⇒ Heading

Returns a new instance of Heading.



6
7
8
9
# File 'lib/docxtor2/package/document/heading.rb', line 6

def initialize(nesting = H1, *args, &block)
  super(*args, &block)
  @params[:style] ||= nesting
end