Class: Axlsx::SheetPr
- Inherits:
-
Object
- Object
- Axlsx::SheetPr
- Defined in:
- lib/axlsx/workbook/worksheet/sheet_pr.rb
Overview
The SheetPr class manages serialization fo a worksheet's sheetPr element. Only fit_to_page is implemented
Instance Attribute Summary collapse
-
#worksheet ⇒ Object
readonly
Returns the value of attribute worksheet.
Instance Method Summary collapse
-
#initialize(worksheet) ⇒ SheetPr
constructor
Creates a new SheetPr object.
-
#to_xml_string(str = '') ⇒ String
Serialize the object.
Constructor Details
Instance Attribute Details
#worksheet ⇒ Object (readonly)
Returns the value of attribute worksheet.
14 15 16 |
# File 'lib/axlsx/workbook/worksheet/sheet_pr.rb', line 14 def worksheet @worksheet end |
Instance Method Details
#to_xml_string(str = '') ⇒ String
Serialize the object
19 20 21 22 |
# File 'lib/axlsx/workbook/worksheet/sheet_pr.rb', line 19 def to_xml_string(str = '') return unless worksheet.fit_to_page? str << "<sheetPr><pageSetUpPr fitToPage=\"%s\"></pageSetUpPr></sheetPr>" % worksheet.fit_to_page? end |