Sha256: 818c7d91d06ddb16fe0729f6782a597e0b71260de048750bf8d0a2114216a25a
Contents?: true
Size: 1.14 KB
Versions: 3
Compression:
Stored size: 1.14 KB
Contents
require_relative 'sheet_view/pane' module OoxmlParser # Class for `sheetView` data class SheetView < OOXMLDocumentObject attr_accessor :pane # @return [True, False] Flag indicating whether this sheet should display gridlines. attr_accessor :show_gridlines # @return [True, False] Flag indicating whether the sheet should display row and column headings. attr_accessor :show_row_column_headers def initialize(parent: nil) @parent = parent @show_gridlines = true @show_row_column_headers = true end # Parse SheetView object # @param node [Nokogiri::XML:Element] node to parse # @return [SheetView] result of parsing def parse(node) node.attributes.each_key do |key| case key when 'showGridLines' @show_gridlines = attribute_enabled?(node, key) when 'showRowColHeaders' @show_row_column_headers = attribute_enabled?(node, key) end end node.xpath('*').each do |node_child| case node_child.name when 'pane' @pane = Pane.new(parent: self).parse(node_child) end end self end end end
Version data entries
3 entries across 3 versions & 1 rubygems