Class: Axlsx::ProtectedRange
- Inherits:
-
Object
- Object
- Axlsx::ProtectedRange
- Includes:
- OptionsParser, SerializedAttributes
- Defined in:
- lib/axlsx/workbook/worksheet/protected_range.rb
Overview
Note:
the recommended way to manage protected ranges with via Worksheet#protect_range
The Protected Range class represents a set of cells in the worksheet
Instance Attribute Summary collapse
-
#name ⇒ String
The name of the protected range.
-
#sqref ⇒ String
The reference for the protected range.
Instance Method Summary collapse
-
#initialize(options = {}) {|_self| ... } ⇒ ProtectedRange
constructor
Initializes a new protected range object.
-
#to_xml_string(str = +'')) ⇒ Object
serializes the proteted range our output to that object.
Methods included from SerializedAttributes
included, #serialized_attributes, #serialized_element_attributes, #serialized_tag
Methods included from OptionsParser
Constructor Details
#initialize(options = {}) {|_self| ... } ⇒ ProtectedRange
Initializes a new protected range object
14 15 16 17 |
# File 'lib/axlsx/workbook/worksheet/protected_range.rb', line 14 def initialize( = {}) yield self if block_given? end |
Instance Attribute Details
#name ⇒ String
The name of the protected range
26 27 28 |
# File 'lib/axlsx/workbook/worksheet/protected_range.rb', line 26 def name @name end |
#sqref ⇒ String
The reference for the protected range
22 23 24 |
# File 'lib/axlsx/workbook/worksheet/protected_range.rb', line 22 def sqref @sqref end |
Instance Method Details
#to_xml_string(str = +'')) ⇒ Object
serializes the proteted range our output to that object. Use this - it helps limit the number of objects created during serialization
44 45 46 |
# File 'lib/axlsx/workbook/worksheet/protected_range.rb', line 44 def to_xml_string(str = +'') serialized_tag 'protectedRange', str end |