class Axlsx::DataValidations
A simple, self serializing class for storing conditional formattings
Attributes
worksheet[R]
The worksheet that owns this collection of tables @return [Worksheet]
Public Class Methods
new(worksheet)
click to toggle source
creates a new Tables
object
Calls superclass method
Axlsx::SimpleTypedList::new
# File lib/axlsx/workbook/worksheet/data_validations.rb, line 7 def initialize(worksheet) raise ArgumentError, "you must provide a worksheet" unless worksheet.is_a?(Worksheet) super DataValidation @worksheet = worksheet end
Public Instance Methods
to_xml_string(str = "")
click to toggle source
serialize the conditional formattings
# File lib/axlsx/workbook/worksheet/data_validations.rb, line 18 def to_xml_string(str = "") return if empty? str << "<dataValidations count='#{size}'>" each { |item| item.to_xml_string(str) } str << '</dataValidations>' end