Class: Axlsx::SheetProtection
- Inherits:
-
Object
- Object
- Axlsx::SheetProtection
- Includes:
- Accessors, OptionsParser, SerializedAttributes
- Defined in:
- lib/axlsx/workbook/worksheet/sheet_protection.rb
Overview
The SheetProtection object manages worksheet protection options per sheet.
Instance Attribute Summary collapse
-
#password ⇒ String
Password hash default nil.
-
#salt_value ⇒ String
readonly
Specifies the salt which was prepended to the user-supplied password before it was hashed using the hashing algorithm.
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ SheetProtection
constructor
Creates a new SheetProtection instance.
-
#to_xml_string(str = '') ⇒ String
Serialize the object.
Methods included from SerializedAttributes
#declared_attributes, included, #serialized_attributes, #serialized_element_attributes, #serialized_tag
Methods included from OptionsParser
Constructor Details
#initialize(options = {}) ⇒ SheetProtection
Creates a new SheetProtection instance
29 30 31 32 33 34 |
# File 'lib/axlsx/workbook/worksheet/sheet_protection.rb', line 29 def initialize(={}) @objects = @scenarios = @select_locked_cells = @select_unlocked_cells = false @sheet = @format_cells = @format_rows = @format_columns = @insert_columns = @insert_rows = @insert_hyperlinks = @delete_columns = @delete_rows = @sort = @auto_filter = @pivot_tables = true @password = nil end |
Instance Attribute Details
#password ⇒ String
Password hash default nil
51 52 53 |
# File 'lib/axlsx/workbook/worksheet/sheet_protection.rb', line 51 def password @password end |
#salt_value ⇒ String (readonly)
Specifies the salt which was prepended to the user-supplied password before it was hashed using the hashing algorithm
46 47 48 |
# File 'lib/axlsx/workbook/worksheet/sheet_protection.rb', line 46 def salt_value @salt_value end |
Instance Method Details
#to_xml_string(str = '') ⇒ String
Serialize the object
78 79 80 |
# File 'lib/axlsx/workbook/worksheet/sheet_protection.rb', line 78 def to_xml_string(str = '') serialized_tag('sheetProtection', str) end |