Class: Axlsx::PageSetUpPr

Inherits:
Object
  • Object
show all
Includes:
OptionsParser, SerializedAttributes
Defined in:
lib/axlsx/workbook/worksheet/page_set_up_pr.rb

Overview

Page setup properties of the worksheet This class name is not a typo, its spec.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from SerializedAttributes

#declared_attributes, included, #serialized_attributes, #serialized_element_attributes, #serialized_tag

Methods included from OptionsParser

#parse_options

Constructor Details

#initialize(options = {}) ⇒ PageSetUpPr

creates a new page setup properties object

Parameters:

  • options (Hash) (defaults to: {})
  • [Boolean] (Hash)

    a customizable set of options



12
13
14
# File 'lib/axlsx/workbook/worksheet/page_set_up_pr.rb', line 12

def initialize(options = {})
  parse_options options
end

Instance Attribute Details

#auto_page_breaksObject

Returns the value of attribute auto_page_breaks.



18
19
20
# File 'lib/axlsx/workbook/worksheet/page_set_up_pr.rb', line 18

def auto_page_breaks
  @auto_page_breaks
end

#fit_to_pageObject

Returns the value of attribute fit_to_page.



19
20
21
# File 'lib/axlsx/workbook/worksheet/page_set_up_pr.rb', line 19

def fit_to_page
  @fit_to_page
end

Instance Method Details

#to_xml_string(str = '') ⇒ Object

serialize to xml



38
39
40
# File 'lib/axlsx/workbook/worksheet/page_set_up_pr.rb', line 38

def to_xml_string(str = '')
  str << ('<pageSetUpPr ' << serialized_attributes << '/>')
end