Sha256: 73358b2fa73b0ee45ecf57d198cec95c6743d29a3846332267a6efb0dbccd709
Contents?: true
Size: 800 Bytes
Versions: 12
Compression:
Stored size: 800 Bytes
Contents
# frozen_string_literal: true module OoxmlParser # Class for parsing <protection> tag class Protection < OOXMLDocumentObject # @return [True, False] Specifies if cell is locked attr_reader :locked # @return [True, False] Specifies if formulas in cell are hidden attr_reader :hidden def initialize(parent: nil) @locked = true @hidden = false super end # Parse Protection data # @param [Nokogiri::XML:Element] node with Protection data # @return [Sheet] value of Protection def parse(node) node.attributes.each do |key, value| case key when 'locked' @locked = attribute_enabled?(value) when 'hidden' @hidden = attribute_enabled?(value) end end self end end end
Version data entries
12 entries across 12 versions & 1 rubygems