class OoxmlParser::WorkbookProtection
Class for parsing <workbookProtection> tag
Attributes
lock_structure[R]
@return [True, False] Specifies if workbook structure is protected
workbook_algorithm_name[R]
@return [String] name of hashing algorithm
workbook_hash_value[R]
@return [String] hash value for the password
workbook_salt_value[R]
@return [String] salt value for the password
workbook_spin_count[R]
@return [Integer] number of times the hashing function shall be iteratively run
Public Instance Methods
parse(node)
click to toggle source
Parse WorkbookProtection
data @param [Nokogiri::XML:Element] node with WorkbookProtection
data @return [Sheet] value of WorkbookProtection
# File lib/ooxml_parser/xlsx_parser/workbook/workbook_protection.rb, line 20 def parse(node) node.attributes.each do |key, value| case key when 'lockStructure' @lock_structure = attribute_enabled?(value) when 'workbookAlgorithmName' @workbook_algorithm_name = value.value.to_s when 'workbookHashValue' @workbook_hash_value = value.value.to_s when 'workbookSaltValue' @workbook_salt_value = value.value.to_s when 'workbookSpinCount' @workbook_spin_count = value.value.to_i end end self end