class Axlsx::TableStyle
A single table style definition and is a collection for tableStyleElements @note Table
are not supported in this version and only the defaults required for a valid workbook are created.
Attributes
name[R]
The name of this table style @return [string]
pivot[R]
indicates if this style should be applied to pivot tables @return [Boolean]
table[R]
indicates if this style should be applied to tables @return [Boolean]
Public Class Methods
new(name, options={})
click to toggle source
creates a new TableStyle
object @raise [ArgumentError] if name option is not provided. @param [String] name @option options [Boolean] pivot @option options [Boolean] table
Calls superclass method
# File lib/axlsx/stylesheet/table_style.rb, line 15 def initialize(name, options={}) self.name = name parse_options options super TableStyleElement end
Public Instance Methods
name=(v)
click to toggle source
@see name
# File lib/axlsx/stylesheet/table_style.rb, line 36 def name=(v) Axlsx::validate_string v; @name=v end
pivot=(v)
click to toggle source
@see pivot
# File lib/axlsx/stylesheet/table_style.rb, line 38 def pivot=(v) Axlsx::validate_boolean v; @pivot=v end
table=(v)
click to toggle source
@see table
# File lib/axlsx/stylesheet/table_style.rb, line 40 def table=(v) Axlsx::validate_boolean v; @table=v end
to_xml_string(str = '')
click to toggle source
Serializes the object @param [String] str @return [String]
# File lib/axlsx/stylesheet/table_style.rb, line 45 def to_xml_string(str = '') str << '<tableStyle ' serialized_attributes str, {:count => self.size} str << '>' each { |table_style_el| table_style_el.to_xml_string(str) } str << '</tableStyle>' end