Class: Axlsx::ConditionalFormattings
- Inherits:
-
SimpleTypedList
- Object
- Array
- SimpleTypedList
- Axlsx::ConditionalFormattings
- Defined in:
- lib/axlsx/workbook/worksheet/conditional_formattings.rb
Overview
A simple, self serializing class for storing conditional formattings
Instance Attribute Summary collapse
-
#worksheet ⇒ Worksheet
readonly
The worksheet that owns this collection of tables.
Instance Method Summary collapse
-
#initialize(worksheet) ⇒ ConditionalFormattings
constructor
creates a new Tables object.
-
#to_xml_string(str = +'')) ⇒ Object
serialize the conditional formattings.
Constructor Details
#initialize(worksheet) ⇒ ConditionalFormattings
creates a new Tables object
7 8 9 10 11 12 |
# File 'lib/axlsx/workbook/worksheet/conditional_formattings.rb', line 7 def initialize(worksheet) raise ArgumentError, "you must provide a worksheet" unless worksheet.is_a?(Worksheet) super(ConditionalFormatting) @worksheet = worksheet end |
Instance Attribute Details
#worksheet ⇒ Worksheet (readonly)
The worksheet that owns this collection of tables
16 17 18 |
# File 'lib/axlsx/workbook/worksheet/conditional_formattings.rb', line 16 def worksheet @worksheet end |
Instance Method Details
#to_xml_string(str = +'')) ⇒ Object
serialize the conditional formattings
19 20 21 22 23 |
# File 'lib/axlsx/workbook/worksheet/conditional_formattings.rb', line 19 def to_xml_string(str = +'') return if empty? each { |item| item.to_xml_string(str) } end |