From cdfc7251bde8347678d355e5fe65fc20e120bc23 Mon Sep 17 00:00:00 2001
From: Randy Morgan Table are not supported in this version and only the defaults required for
-a valid workbook are created.
+Table are not supported in this version and only the defaults required for
+a valid workbook are created.
+ A single table style definition and is a collection for tableStyleElements
+A single table style definition and is a collection for tableStyleElements
+
The name of this table style.
++The name of this table style. +
indicates if this style should be applied to pivot tables.
++indicates if this style should be applied to pivot tables. +
indicates if this style should be applied to tables.
++indicates if this style should be applied to tables. +
creates a new TableStyle object.
++creates a new TableStyle object. +
Serializes the table style.
++Serializes the table style. +
creates a new TableStyle object
++creates a new TableStyle object +
a customizable set of options
++a customizable set of options +
if name option is not provided.
++if name option is not provided. +
# File 'lib/axlsx/stylesheet/table_style.rb', line 23 -def initialize(name, ={}) - self.name = name - .each do |o| - self.send("#{o[0]}=", o[1]) if self.respond_to? o[0] - end - super TableStyleElement -end+def initialize(name, ={}) + self.name = name + .each do |o| + self.send("#{o[0]}=", o[1]) if self.respond_to? o[0] + end + super TableStyleElement +end +
The name of this table style
++The name of this table style +
# File 'lib/axlsx/stylesheet/table_style.rb', line 8 -def name - @name -end+def name + @name +end +
indicates if this style should be applied to pivot tables
++indicates if this style should be applied to pivot tables +
# File 'lib/axlsx/stylesheet/table_style.rb', line 12 -def pivot - @pivot -end+def pivot + @pivot +end +
indicates if this style should be applied to tables
++indicates if this style should be applied to tables +
# File 'lib/axlsx/stylesheet/table_style.rb', line 16 -def table - @table -end+def table + @table +end +
Serializes the table style
++Serializes the table style +
The document builder instance this objects xml will be added to.
++The document builder instance this objects xml will be added to. +
# File 'lib/axlsx/stylesheet/table_style.rb', line 41 -def to_xml(xml) - attr = self.instance_values.select { |k, v| [:name, :pivot, :table].include? k } - attr[:count] = self.size - xml.tableStyle(attr) { self.each { |table_style_el| table_style_el.to_xml(xml) } } -end+def to_xml(xml) + attr = self.instance_values.select { |k, v| [:name, :pivot, :table].include? k } + attr[:count] = self.size + xml.tableStyle(attr) { self.each { |table_style_el| table_style_el.to_xml(xml) } } +end +