Sha256: c7a988f45d4ea37333be92578959192a8fa5b17c2b746bf8d681952c25d50287
Contents?: true
Size: 1.46 KB
Versions: 41
Compression:
Stored size: 1.46 KB
Contents
# frozen_string_literal: true module OoxmlParser # Describe look of table, parsed `w:tblLook` class TableLook < OOXMLDocumentObject attr_accessor :first_row, :first_column, :last_row, :last_column, :banding_row, :banding_column, :no_horizontal_banding, :no_vertical_banding def initialize(parent: nil) @first_row = false @first_column = false @last_row = false @last_column = false @banding_row = false @banding_column = false @no_horizontal_banding = false @no_horizontal_banding = false super end # Parse TableLook object # @param node [Nokogiri::XML:Element] node to parse # @return [TableLook] result of parsing def parse(node) node.attributes.each do |key, value| case key when 'firstRow' @first_row = attribute_enabled?(value) when 'lastRow' @last_row = attribute_enabled?(value) when 'firstCol', 'firstColumn' @first_column = attribute_enabled?(value) when 'lastCol', 'lastColumn' @last_column = attribute_enabled?(value) when 'noHBand' @no_horizontal_banding = attribute_enabled?(value) when 'noVBand' @no_vertical_banding = attribute_enabled?(value) when 'bandRow' @banding_row = attribute_enabled?(value) when 'bandCol' @banding_column = attribute_enabled?(value) end end self end end end
Version data entries
41 entries across 41 versions & 1 rubygems