class OoxmlParser::Protection
Class for parsing <protection> tag
Attributes
@return [True, False] Specifies if cell is locked
Public Class Methods
Source
# File lib/ooxml_parser/xlsx_parser/workbook/style_sheet/cell_xfs/cell_style/protection.rb, line 11 def initialize(parent: nil) @locked = true @hidden = false super end
Calls superclass method
OoxmlParser::OOXMLDocumentObject::new
Public Instance Methods
Source
# File lib/ooxml_parser/xlsx_parser/workbook/style_sheet/cell_xfs/cell_style/protection.rb, line 20 def parse(node) node.attributes.each do |key, value| case key when 'locked' @locked = boolean_attribute_value(value) when 'hidden' @hidden = boolean_attribute_value(value) end end self end
Parse Protection
data @param [Nokogiri::XML:Element] node with Protection
data @return [Sheet] value of Protection