Class: Axlsx::PrintOptions
- Inherits:
-
Object
- Object
- Axlsx::PrintOptions
- Includes:
- Accessors, OptionsParser, SerializedAttributes
- Defined in:
- lib/axlsx/workbook/worksheet/print_options.rb
Overview
Note:
The recommended way to manage print options is via Worksheet#print_options
Options for printing a worksheet. All options are boolean and false by default.
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ PrintOptions
constructor
Creates a new PrintOptions object.
-
#set(options) ⇒ Object
Set some or all options at once.
-
#to_xml_string(str = +'')) ⇒ String
Serializes the page options element.
Methods included from SerializedAttributes
included, #serialized_attributes, #serialized_element_attributes, #serialized_tag
Methods included from OptionsParser
Constructor Details
#initialize(options = {}) ⇒ PrintOptions
Creates a new PrintOptions object
18 19 20 21 |
# File 'lib/axlsx/workbook/worksheet/print_options.rb', line 18 def initialize( = {}) @grid_lines = @headings = @horizontal_centered = @vertical_centered = false set() end |
Instance Method Details
#set(options) ⇒ Object
Set some or all options at once.
28 29 30 |
# File 'lib/axlsx/workbook/worksheet/print_options.rb', line 28 def set() end |
#to_xml_string(str = +'')) ⇒ String
Note:
As all attributes default to "false" according to the xml schema definition, the generated xml includes only those attributes that are set to true.
Serializes the page options element.
36 37 38 |
# File 'lib/axlsx/workbook/worksheet/print_options.rb', line 36 def to_xml_string(str = +'') serialized_tag 'printOptions', str end |