Class: OoxmlParser::ProtectedRange
- Inherits:
-
OOXMLDocumentObject
- Object
- OOXMLDocumentObject
- OoxmlParser::ProtectedRange
- Defined in:
- lib/ooxml_parser/xlsx_parser/workbook/worksheet/protected_range.rb
Overview
Class for parsing <protectedRange> tag
Instance Attribute Summary collapse
-
#algorithm_name ⇒ String
readonly
Name of hashing algorithm.
-
#hash_value ⇒ String
readonly
Hash value for the password.
-
#name ⇒ String
Name of protected range.
-
#reference_sequence ⇒ String
readonly
Range reference.
-
#salt_value ⇒ String
readonly
Salt value for the password.
-
#spin_count ⇒ Integer
readonly
Number of times the hashing function shall be iteratively run.
Attributes inherited from OOXMLDocumentObject
Instance Method Summary collapse
-
#parse(node) ⇒ Sheet
Parse ProtectedRange data.
Methods inherited from OOXMLDocumentObject
#==, #boolean_attribute_value, #initialize, #parse_xml, #with_data?
Methods included from OoxmlObjectAttributeHelper
#attribute_enabled?, #option_enabled?
Methods included from OoxmlDocumentObjectHelper
Constructor Details
This class inherits a constructor from OoxmlParser::OOXMLDocumentObject
Instance Attribute Details
#algorithm_name ⇒ String (readonly)
Returns Name of hashing algorithm.
7 8 9 |
# File 'lib/ooxml_parser/xlsx_parser/workbook/worksheet/protected_range.rb', line 7 def algorithm_name @algorithm_name end |
#hash_value ⇒ String (readonly)
Returns Hash value for the password.
9 10 11 |
# File 'lib/ooxml_parser/xlsx_parser/workbook/worksheet/protected_range.rb', line 9 def hash_value @hash_value end |
#name ⇒ String
Returns Name of protected range.
15 16 17 |
# File 'lib/ooxml_parser/xlsx_parser/workbook/worksheet/protected_range.rb', line 15 def name @name end |
#reference_sequence ⇒ String (readonly)
Returns Range reference.
17 18 19 |
# File 'lib/ooxml_parser/xlsx_parser/workbook/worksheet/protected_range.rb', line 17 def reference_sequence @reference_sequence end |
#salt_value ⇒ String (readonly)
Returns Salt value for the password.
11 12 13 |
# File 'lib/ooxml_parser/xlsx_parser/workbook/worksheet/protected_range.rb', line 11 def salt_value @salt_value end |
#spin_count ⇒ Integer (readonly)
Returns Number of times the hashing function shall be iteratively run.
13 14 15 |
# File 'lib/ooxml_parser/xlsx_parser/workbook/worksheet/protected_range.rb', line 13 def spin_count @spin_count end |
Instance Method Details
#parse(node) ⇒ Sheet
Parse ProtectedRange data
22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 |
# File 'lib/ooxml_parser/xlsx_parser/workbook/worksheet/protected_range.rb', line 22 def parse(node) node.attributes.each do |key, value| case key when 'algorithmName' @algorithm_name = value.value.to_s when 'hashValue' @hash_value = value.value.to_s when 'saltValue' @salt_value = value.value.to_s when 'spinCount' @spin_count = value.value.to_i when 'name' @name = value.value.to_s when 'sqref' @reference_sequence = value.value.to_s end end self end |