Class: Axlsx::HeaderFooter
- Inherits:
-
Object
- Object
- Axlsx::HeaderFooter
- Includes:
- Accessors, OptionsParser, SerializedAttributes
- Defined in:
- lib/axlsx/workbook/worksheet/header_footer.rb
Overview
Note:
The recommended way of managing header/footers is via Worksheet#header_footer
Header/Footer options for printing a worksheet. All settings are optional.
Headers and footers are generated using a string which is a combination of plain text and control characters. A fairly comprehensive list of control characters can be found here: https://github.com/randym/axlsx/blob/master/notes_on_header_footer.md
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ HeaderFooter
constructor
Creates a new HeaderFooter object.
-
#set(options) ⇒ Object
Set some or all header/footers at once.
-
#to_xml_string(str = +'')) ⇒ String
Serializes the header/footer object.
Methods included from SerializedAttributes
included, #serialized_attributes, #serialized_element_attributes, #serialized_tag
Methods included from OptionsParser
Constructor Details
#initialize(options = {}) ⇒ HeaderFooter
Creates a new HeaderFooter object
27 28 29 |
# File 'lib/axlsx/workbook/worksheet/header_footer.rb', line 27 def initialize( = {}) end |
Instance Method Details
#set(options) ⇒ Object
Set some or all header/footers at once.
38 39 40 |
# File 'lib/axlsx/workbook/worksheet/header_footer.rb', line 38 def set() end |
#to_xml_string(str = +'')) ⇒ String
Serializes the header/footer object.
45 46 47 48 49 50 51 |
# File 'lib/axlsx/workbook/worksheet/header_footer.rb', line 45 def to_xml_string(str = +'') serialized_tag('headerFooter', str) do serialized_element_attributes(str) do |value| ::CGI.escapeHTML(value) end end end |