diff options
Diffstat (limited to 'lib/axlsx/stylesheet/cell_protection.rb')
| -rw-r--r-- | lib/axlsx/stylesheet/cell_protection.rb | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/lib/axlsx/stylesheet/cell_protection.rb b/lib/axlsx/stylesheet/cell_protection.rb index b874b214..4309b0e8 100644 --- a/lib/axlsx/stylesheet/cell_protection.rb +++ b/lib/axlsx/stylesheet/cell_protection.rb @@ -27,17 +27,14 @@ module Axlsx # @see locked def locked=(v) Axlsx::validate_boolean v; @locked = v end + # Serializes the object + # @param [String] str + # @return [String] def to_xml_string(str = '') str << '<protection ' str << instance_values.map { |key, value| '' << key.to_s << '="' << value.to_s << '"' }.join(' ') str << '/>' end - # Serializes the cell protection - # @param [Nokogiri::XML::Builder] xml The document builder instance this objects xml will be added to. - # @return [String] - def to_xml(xml) - xml.protection(self.instance_values) - end end end |
