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/Core.html | 465 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 465 insertions(+) create mode 100644 doc/Axlsx/Core.html (limited to 'doc/Axlsx/Core.html') diff --git a/doc/Axlsx/Core.html b/doc/Axlsx/Core.html new file mode 100644 index 00000000..ab5ae902 --- /dev/null +++ b/doc/Axlsx/Core.html @@ -0,0 +1,465 @@ + + + + + + Class: Axlsx::Core + + — Documentation by YARD 0.7.3 + + + + + + + + + + + + + + + + + + + + + + +

Class: Axlsx::Core + + + +

+ +
+ +
Inherits:
+
+ Object + +
    +
  • Object
  • + + + +
+ show all + +
+ + + + + + + + + +
Defined in:
+
lib/axlsx/doc_props/core.rb
+ +
+
+ +

Overview

+
+ +
+ Note: +

+Packages manage their own core object. +

+
+
+ +

+The core object for the package. +

+ + +
+
+
+ + +

See Also:

+
    + +
  • Package#core
  • + +
+ +
+ +

Instance Attribute Summary (collapse)

+ + + + + + +

+ Instance Method Summary + (collapse) +

+ + + + +
+

Constructor Details

+ +
+

+ + - (Core) initialize(options = {}) + + + +

+
+

+Creates a new Core object. +

+ + +
+
+
+

Parameters:

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

    +a customizable set of options +

    +
    + +
  • + +
+ + + + +

Options Hash (options):

+
    + +
  • + creator + (String) + + + + +
  • + +
+ + + +
+ + + + +
+
+
+
+12
+13
+14
+
+
# File 'lib/axlsx/doc_props/core.rb', line 12
+
+def initialize(options={})
+  @creator = options[:creator] || 'axlsx'      
+end
+
+
+
+ +
+ +
+

Instance Attribute Details

+ + + + +
+

+ + - (String) creator + + + +

+
+

+The author of the document. By default this is ‘axlsx’ +

+ + +
+
+
+ +

Returns:

+
    + +
  • + + + (String) + + + +
  • + +
+ +
+ + + + +
+
+
+
+8
+9
+10
+
+
# File 'lib/axlsx/doc_props/core.rb', line 8
+
+def creator
+  @creator
+end
+
+
+
+ +
+ + +
+

Instance Method Details

+ + +
+

+ + - (String) to_xml + + + +

+
+

+Serializes the core object. The created dcterms item is set to the current +time when this method is called. +

+ + +
+
+
+ +

Returns:

+
    + +
  • + + + (String) + + + +
  • + +
+ +
+ + + + +
+
+
+
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+
+
# File 'lib/axlsx/doc_props/core.rb', line 18
+
+def to_xml()
+  builder = Nokogiri::XML::Builder.new(:encoding => ENCODING) do |xml|
+    xml.send('cp:coreProperties', 
+             :"xmlns:cp" => CORE_NS, 
+             :'xmlns:dc' => CORE_NS_DC, 
+             :'xmlns:dcmitype'=>CORE_NS_DCMIT, 
+             :'xmlns:dcterms'=>CORE_NS_DCT, 
+             :'xmlns:xsi'=>CORE_NS_XSI) {
+      xml['dc'].creator self.creator
+      xml['dcterms'].created Time.now.strftime('%Y-%m-%dT%H:%M:%S'), :'xsi:type'=>"dcterms:W3CDTF"
+      xml['cp'].revision 0
+    }
+  end  
+  builder.to_xml
+end
+
+
+
+ +
+ +
+ + + + + \ No newline at end of file -- cgit v1.2.3