From 8cf0296bbc16e8eb535e9af932eed2557d5e66d2 Mon Sep 17 00:00:00 2001 From: Randy Morgan Date: Thu, 1 Dec 2011 14:11:42 +0900 Subject: removing generated yard docs from repository --- doc/Axlsx/Ar/SingletonMethods.html | 312 ------------------------------------- 1 file changed, 312 deletions(-) delete mode 100644 doc/Axlsx/Ar/SingletonMethods.html (limited to 'doc/Axlsx/Ar/SingletonMethods.html') diff --git a/doc/Axlsx/Ar/SingletonMethods.html b/doc/Axlsx/Ar/SingletonMethods.html deleted file mode 100644 index 58b6b29c..00000000 --- a/doc/Axlsx/Ar/SingletonMethods.html +++ /dev/null @@ -1,312 +0,0 @@ - - - - - - Module: Axlsx::Ar::SingletonMethods - - — AXLSX - - - - - - - - - - - - - - - - - - - - - - -

Module: Axlsx::Ar::SingletonMethods - - - -

- -
- - - - - - - - -
Defined in:
-
lib/axlsx/ar.rb
- -
-
- -

Overview

-
- -

Singleton methods for the mixin

- - -
-
-
- - -
- - - - - -

- Instance Method Summary - (collapse) -

- - - - - - -
-

Instance Method Details

- - -
-

- - - (Object) to_xlsx(number = :all, options = {}) - - - -

-
- -

Maps the AR class to an Axlsx package options are passed into AR find

- - -
-
-
-

Parameters:

-
    - -
  • - - Symbol, - - - (Symbol, :all, etc.) - - - - — -
    -

    :all, etc.

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

    a customizable set of options

    -
    - -
  • - -
- - - - - - -

Options Hash (options):

-
    - -
  • - header_style - (Integer) - - - - —
    -

    to apply to the first row of field names

    -
    -
  • - -
  • - an - (Array, Symbol) - - - - —
    -

    array of Axlsx types for each cell in data rows or a single type that will -be applied to all types.

    -
    -
  • - -
  • - style - (Integer, Array) - - - - —
    -

    The style to pass to Worksheet#add_row

    -
    -
  • - -
- - - -

See Also:

- - -
- - - - -
-
-
-
-32
-33
-34
-35
-36
-37
-38
-39
-40
-41
-42
-43
-44
-45
-46
-47
-48
-49
-50
-51
-52
-
-
# File 'lib/axlsx/ar.rb', line 32
-
-def to_xlsx(number = :all, options = {})
-  row_style = options.delete(:style)
-  header_style = options.delete(:header_style) || row_style
-  types = options.delete(:types)
-
-  data = [*find(number, options)]
-  data.compact!
-  data.flatten!
-  columns = data.first.attributes.keys
-  p = Package.new
-  row_style = p.workbook.styles.add_style(row_style) unless row_style.nil?
-  header_style = p.workbook.styles.add_style(header_style) unless header_style.nil?
-  
-  p.workbook.add_worksheet(:name=>table_name.humanize) do |sheet|
-    sheet.add_row columns, :style=>header_style
-    data.each do |r|
-      sheet.add_row r.attributes.values, :style=>row_style, :types=>types
-    end
-  end
-  p
-end
-
-
- -
- -
- - - - - \ No newline at end of file -- cgit v1.2.3