Class: Axlsx::CellProtection
- Inherits:
-
Object
- Object
- Axlsx::CellProtection
- Includes:
- OptionsParser, SerializedAttributes
- Defined in:
- lib/axlsx/stylesheet/cell_protection.rb
Overview
Note:
Using Styles#add_style is the recommended way to manage cell protection.
CellProtection stores information about locking or hiding cells in spreadsheet.
Instance Attribute Summary collapse
-
#hidden ⇒ Boolean
specifies locking for cells that have the style containing this protection.
-
#locked ⇒ Boolean
specifies if the cells that have the style containing this protection.
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ CellProtection
constructor
Creates a new CellProtection.
-
#to_xml_string(str = '') ⇒ String
Serializes the object.
Methods included from SerializedAttributes
included, #serialized_attributes
Methods included from OptionsParser
Constructor Details
#initialize(options = {}) ⇒ CellProtection
Creates a new CellProtection
24 25 26 |
# File 'lib/axlsx/stylesheet/cell_protection.rb', line 24 def initialize(={}) end |
Instance Attribute Details
#hidden ⇒ Boolean
specifies locking for cells that have the style containing this protection
15 16 17 |
# File 'lib/axlsx/stylesheet/cell_protection.rb', line 15 def hidden @hidden end |
#locked ⇒ Boolean
specifies if the cells that have the style containing this protection
19 20 21 |
# File 'lib/axlsx/stylesheet/cell_protection.rb', line 19 def locked @locked end |
Instance Method Details
#to_xml_string(str = '') ⇒ String
Serializes the object
36 37 38 39 40 |
# File 'lib/axlsx/stylesheet/cell_protection.rb', line 36 def to_xml_string(str = '') str << '<protection ' serialized_attributes str str << '/>' end |