From 2d0ac967e94c5944ccccf9adad8da5a9d082df29 Mon Sep 17 00:00:00 2001 From: Randy Morgan Date: Sun, 20 Nov 2011 23:44:58 +0900 Subject: pushing docs --- doc/Axlsx/TableStyle.html | 710 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 710 insertions(+) create mode 100644 doc/Axlsx/TableStyle.html (limited to 'doc/Axlsx/TableStyle.html') diff --git a/doc/Axlsx/TableStyle.html b/doc/Axlsx/TableStyle.html new file mode 100644 index 00000000..99a4846c --- /dev/null +++ b/doc/Axlsx/TableStyle.html @@ -0,0 +1,710 @@ + + + + + + Class: Axlsx::TableStyle + + — Documentation by YARD 0.7.3 + + + + + + + + + + + + + + + + + + + + + + +

Class: Axlsx::TableStyle + + + +

+ +
+ +
Inherits:
+
+ SimpleTypedList + + + show all + +
+ + + + + + + + + +
Defined in:
+
lib/axlsx/stylesheet/table_style.rb
+ +
+
+ +

Overview

+
+ +
+ Note: +

+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 +

+ + +
+
+
+ + +
+ + + + + +

Instance Attribute Summary (collapse)

+ + + + + + + + + +

Attributes inherited from SimpleTypedList

+

allowed_types, locked_at, serialize_as

+ + + +

+ Instance Method Summary + (collapse) +

+ + + + + + + + + + + + +

Methods inherited from SimpleTypedList

+

#<<, #[]=, #delete, #delete_at, #lock, #method_missing, #protected?, #push, #unlock

+
+

Constructor Details

+ +
+

+ + - (TableStyle) initialize(name, options = {}) + + + +

+
+

+creates a new TableStyle object +

+ + +
+
+
+

Parameters:

+
    + +
  • + + name + + + (String) + + + +
  • + +
  • + + options + + + (Hash) + + + (defaults to: {}) + + + — +

    +a customizable set of options +

    +
    + +
  • + +
+ + + + + + +

Options Hash (options):

+
    + +
  • + pivot + (Boolean) + + + + +
  • + +
  • + table + (Boolean) + + + + +
  • + +
+ + +

Raises:

+
    + +
  • + + + (ArgumentError) + + + + — +

    +if name option is not provided. +

    +
    + +
  • + +
+ +
+ + + + +
+
+
+
+23
+24
+25
+26
+27
+28
+29
+
+
# File 'lib/axlsx/stylesheet/table_style.rb', line 23
+
+def initialize(name, options={})
+  self.name = name
+  options.each do |o|
+    self.send("#{o[0]}=", o[1]) if self.respond_to? o[0]
+  end
+  super TableStyleElement
+end
+
+
+
+ +
+
+

Dynamic Method Handling

+

+ This class handles dynamic methods through the method_missing method + + in the class Axlsx::SimpleTypedList + +

+ +
+ +
+

Instance Attribute Details

+ + + + +
+

+ + - (string) name + + + +

+
+

+The name of this table style +

+ + +
+
+
+ +

Returns:

+
    + +
  • + + + (string) + + + +
  • + +
+ +
+ + + + +
+
+
+
+8
+9
+10
+
+
# File 'lib/axlsx/stylesheet/table_style.rb', line 8
+
+def name
+  @name
+end
+
+
+
+ + + + +
+

+ + - (Boolean) pivot + + + +

+
+

+indicates if this style should be applied to pivot tables +

+ + +
+
+
+ +

Returns:

+
    + +
  • + + + (Boolean) + + + +
  • + +
+ +
+ + + + +
+
+
+
+12
+13
+14
+
+
# File 'lib/axlsx/stylesheet/table_style.rb', line 12
+
+def pivot
+  @pivot
+end
+
+
+
+ + + + +
+

+ + - (Boolean) table + + + +

+
+

+indicates if this style should be applied to tables +

+ + +
+
+
+ +

Returns:

+
    + +
  • + + + (Boolean) + + + +
  • + +
+ +
+ + + + +
+
+
+
+16
+17
+18
+
+
# File 'lib/axlsx/stylesheet/table_style.rb', line 16
+
+def table
+  @table
+end
+
+
+
+ +
+ + +
+

Instance Method Details

+ + +
+

+ + - (String) to_xml(xml) + + + +

+
+

+Serializes the table style +

+ + +
+
+
+

Parameters:

+
    + +
  • + + xml + + + (Nokogiri::XML::Builder) + + + + — +

    +The document builder instance this objects xml will be added to. +

    +
    + +
  • + +
+ +

Returns:

+
    + +
  • + + + (String) + + + +
  • + +
+ +
+ + + + +
+
+
+
+38
+39
+40
+41
+42
+
+
# File 'lib/axlsx/stylesheet/table_style.rb', line 38
+
+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
+
+
+
+ +
+ +
+ + + + + \ No newline at end of file -- cgit v1.2.3