class Axlsx::CellProtection
CellProtection
stores information about locking or hiding cells in spreadsheet. @note Using Styles#add_style
is the recommended way to manage cell protection. @see Styles#add_style
Attributes
locked[R]
specifies if the cells that have the style containing this protection @return [Boolean]
Public Class Methods
new(options={})
click to toggle source
Creates a new CellProtection
@option options [Boolean] hidden value for hidden protection @option options [Boolean] locked value for locked protection
# File lib/axlsx/stylesheet/cell_protection.rb, line 24 def initialize(options={}) parse_options options end
Public Instance Methods
locked=(v)
click to toggle source
@see locked
# File lib/axlsx/stylesheet/cell_protection.rb, line 31 def locked=(v) Axlsx::validate_boolean v; @locked = v end
to_xml_string(str = '')
click to toggle source
Serializes the object @param [String] str @return [String]
# File lib/axlsx/stylesheet/cell_protection.rb, line 36 def to_xml_string(str = '') str << '<protection ' serialized_attributes str str << '/>' end