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
#declared_attributes, included, #serialized_attributes, #serialized_element_attributes, #serialized_tag
Methods included from OptionsParser
Constructor Details
#initialize(options = {}) ⇒ CellProtection
Creates a new CellProtection
22 23 24 |
# File 'lib/axlsx/stylesheet/cell_protection.rb', line 22 def initialize( = {}) end |
Instance Attribute Details
#hidden ⇒ Boolean
specifies locking for cells that have the style containing this protection
13 14 15 |
# File 'lib/axlsx/stylesheet/cell_protection.rb', line 13 def hidden @hidden end |
#locked ⇒ Boolean
specifies if the cells that have the style containing this protection
17 18 19 |
# File 'lib/axlsx/stylesheet/cell_protection.rb', line 17 def locked @locked end |
Instance Method Details
#to_xml_string(str = '') ⇒ String
Serializes the object
34 35 36 |
# File 'lib/axlsx/stylesheet/cell_protection.rb', line 34 def to_xml_string(str = '') serialized_tag('protection', str) end |