Class: Odf::Element::Heading
- Includes:
- AbstractContenteable
- Defined in:
- lib/odf/element/heading.rb
Constant Summary collapse
- XML_TAG =
'text:h'.freeze
Instance Attribute Summary
Attributes inherited from Abstract
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(parent, content, options = {}) ⇒ Heading
constructor
A new instance of Heading.
Methods inherited from Abstract
#document, #valid_options, #xml_tag
Constructor Details
#initialize(parent, content, options = {}) ⇒ Heading
Returns a new instance of Heading.
12 13 14 15 |
# File 'lib/odf/element/heading.rb', line 12 def initialize(parent, content, = {}) = { level: 1 }.merge() super(parent, content, ) end |
Class Method Details
.build(parent, text, options = {}) ⇒ Object
8 9 10 |
# File 'lib/odf/element/heading.rb', line 8 def self.build(parent, text, = {}) new(parent, text, ) end |