Class: Axlsx::WorkbookView

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

Overview

A BookView defines the display properties for a workbook. Units for window widths and other dimensions are expressed in twips. Twip measurements are portable between different display resolutions. The formula is (screen pixels) * (20 * 72) / (logical device dpi), where the logical device dpi can be different for x and y coordinates.

Instance Method Summary collapse

Methods included from OptionsParser

#parse_options

Methods included from SerializedAttributes

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

Constructor Details

#initialize(options = {}) {|_self| ... } ⇒ WorkbookView

Creates a new BookView object

Parameters:

  • options (Hash) (defaults to: {})

    A hash of key/value pairs that will be mapped to this instances attributes.

  • [Symbol] (Hash)

    a customizable set of options

  • [Boolean] (Hash)

    a customizable set of options

  • [Integer] (Hash)

    a customizable set of options

Yields:

  • (_self)

Yield Parameters:


50
51
52
53
# File 'lib/axlsx/workbook/workbook_view.rb', line 50

def initialize(options={})
  parse_options options
  yield self if block_given?
end

Instance Method Details

#to_xml_string(str = '') ⇒ String

Serialize the WorkbookView

Parameters:

  • str (String) (defaults to: '')

Returns:

  • (String)

74
75
76
77
78
# File 'lib/axlsx/workbook/workbook_view.rb', line 74

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