Sha256: 6b20031bc11e4f1b0d02232af892339cc2d569ecab52212aaa7a78623ff295d8
Contents?: true
Size: 1.16 KB
Versions: 19
Compression:
Stored size: 1.16 KB
Contents
# frozen_string_literal: true 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) @show_gridlines = true @show_row_column_headers = true super 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
19 entries across 19 versions & 1 rubygems