acts_as_xlsx 1.0.0 → 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile.lock CHANGED
@@ -1,21 +1,33 @@
1
1
  GEM
2
2
  remote: http://rubygems.org/
3
3
  specs:
4
- activerecord (2.3.9)
5
- activesupport (= 2.3.9)
6
- activesupport (2.3.9)
4
+ activemodel (3.1.3)
5
+ activesupport (= 3.1.3)
6
+ builder (~> 3.0.0)
7
+ i18n (~> 0.6)
8
+ activerecord (3.1.3)
9
+ activemodel (= 3.1.3)
10
+ activesupport (= 3.1.3)
11
+ arel (~> 2.2.1)
12
+ tzinfo (~> 0.3.29)
13
+ activesupport (3.1.3)
14
+ multi_json (~> 1.0)
15
+ arel (2.2.1)
7
16
  axlsx (1.0.10)
8
17
  activesupport (>= 2.3.9)
9
18
  i18n (>= 0.6.0)
10
19
  nokogiri (>= 1.4.1)
11
20
  rmagick (>= 2.12.2)
12
21
  zip (>= 2.0.2)
22
+ builder (3.0.0)
13
23
  i18n (0.6.0)
24
+ multi_json (1.0.4)
14
25
  nokogiri (1.5.0)
15
- rake (0.9.2)
26
+ rake (0.9.2.2)
16
27
  rdiscount (1.6.8)
17
28
  rmagick (2.13.1)
18
29
  sqlite3 (1.3.4)
30
+ tzinfo (0.3.31)
19
31
  yard (0.7.3)
20
32
  zip (2.0.2)
21
33
 
data/README.md CHANGED
@@ -7,9 +7,9 @@ Acts as xlsx: Office Open XML Spreadsheet Generation plugin for active record
7
7
  **Author**: Randy Morgan
8
8
  **Copyright**: 2011
9
9
  **License**: MIT License
10
- **Latest Version**: 1.0.0
10
+ **Latest Version**: 1.0.1
11
11
  **Ruby Version**: 1.8.7 - 1.9.3
12
- **Release Date**: November 30th 2011
12
+ **Release Date**: December 1st 2011
13
13
 
14
14
  Synopsis
15
15
  --------
@@ -27,7 +27,7 @@ Feature List
27
27
 
28
28
  **4. Automates localization of column heading with i18n support
29
29
 
30
- **5. Lets you specify columns to exclude from the report.
30
+ **5. Lets you specify columns the precise columns and/or methods you want to call to populate your table in one go.
31
31
 
32
32
  **6. Gives you access to the axlsx package so you can add styles, charts and pictures to satisfy those flashy sales guys.
33
33
 
@@ -68,6 +68,9 @@ A trivial rails example
68
68
  Specify columns and methods and i18n chain
69
69
  p = Post.to_xlsx :columns => [:name, :title, :ranking], :i18n => 'activerecord.attributes'
70
70
 
71
+ For examples on how to use axlsx for custom styles, charts, images and more see:
72
+ [http://rubygems.org/gems/axlsx] (https://rubygems.org/gems/axlsx)
73
+
71
74
  ###Documentation
72
75
 
73
76
  This gem is 100% documented with YARD, an exceptional documentation library. To see documentation for this, and all the gems installed on your system use:
@@ -82,6 +85,12 @@ This gem has 100% coverage using Test::Unit
82
85
 
83
86
  Changelog
84
87
  ---------
88
+ - **October.30.11**: 1.0.1 release
89
+ - Patch for inclusion error
90
+
91
+ - **October.30.11**: 1.0.0 release
92
+ - First release
93
+
85
94
  - **October.30.11**: 1.0.0a release
86
95
  - First pre release
87
96
 
data/acts_as_xlsx.gemspec CHANGED
@@ -1,5 +1,5 @@
1
1
  require 'rake'
2
- acts_as_xlsx_version = "1.0.0"
2
+ acts_as_xlsx_version = "1.0.1"
3
3
  Gem::Specification.new do |s|
4
4
  s.name = 'acts_as_xlsx'
5
5
  s.version = acts_as_xlsx_version
@@ -72,15 +72,16 @@
72
72
 
73
73
 
74
74
  <dt class="r1 last">Defined in:</dt>
75
- <dd class="r1 last">lib/axlsx/acts_as_xlsx.rb</dd>
75
+ <dd class="r1 last">lib/acts_as_xlsx.rb</dd>
76
76
 
77
77
  </dl>
78
78
  <div class="clear"></div>
79
79
 
80
80
  <h2>Overview</h2><div class="docstring">
81
81
  <div class="discussion">
82
-
83
- <p>Class methods for the mixin</p>
82
+ <p>
83
+ Class methods for the mixin
84
+ </p>
84
85
 
85
86
 
86
87
  </div>
@@ -117,8 +118,9 @@
117
118
 
118
119
 
119
120
 
120
- <span class="summary_desc"><div class='inline'>
121
- <p>defines the class method to inject to_xlsx.</p>
121
+ <span class="summary_desc"><div class='inline'><p>
122
+ defines the class method to inject to_xlsx.
123
+ </p>
122
124
  </div></span>
123
125
 
124
126
  </li>
@@ -142,8 +144,9 @@
142
144
 
143
145
  </p><div class="docstring">
144
146
  <div class="discussion">
145
-
146
- <p>defines the class method to inject to_xlsx</p>
147
+ <p>
148
+ defines the class method to inject to_xlsx
149
+ </p>
147
150
 
148
151
 
149
152
  </div>
@@ -154,8 +157,9 @@
154
157
  <h3>Examples:</h3>
155
158
 
156
159
  <h4><div class='inline'></div></h4>
157
- <pre class="example code">class MyModel &lt; ActiveRecord::Base
158
- acts_as_xlsx :columns=&gt; [:id, :created_at, :updated_at], :i18n =&gt; 'activerecord.attributes'</pre>
160
+ <pre class="example code"><span class='class class kw'>class</span> <span class='MyModel constant id'>MyModel</span> <span class='lt op'>&lt;</span> <span class='ActiveRecord constant id'>ActiveRecord</span><span class='colon2 op'>::</span><span class='Base constant id'>Base</span>
161
+ <span class='acts_as_xlsx identifier id'>acts_as_xlsx</span> <span class='symbol val'>:columns=</span><span class='gt op'>&gt;</span> <span class='lbrack token'>[</span><span class='symbol val'>:id</span><span class='comma token'>,</span> <span class='symbol val'>:created_at</span><span class='comma token'>,</span> <span class='symbol val'>:updated_at</span><span class='rbrack token'>]</span><span class='comma token'>,</span> <span class='symbol val'>:i18n</span> <span class='assign token'>=</span><span class='gt op'>&gt;</span> <span class='string val'>'activerecord.attributes'</span>
162
+ </pre>
159
163
 
160
164
  </div>
161
165
  <h3>Parameters:</h3>
@@ -173,8 +177,9 @@
173
177
 
174
178
 
175
179
  &mdash;
176
- <div class='inline'>
177
- <p>a customizable set of options</p>
180
+ <div class='inline'><p>
181
+ a customizable set of options
182
+ </p>
178
183
  </div>
179
184
 
180
185
  </li>
@@ -193,9 +198,10 @@
193
198
  <span class="default">
194
199
 
195
200
  </span>
196
- &mdash; <div class='inline'>
197
- <p>an array of symbols defining the columns and methods to call in generating
198
- sheet data for each row.</p>
201
+ &mdash; <div class='inline'><p>
202
+ an array of symbols defining the columns and methods to call in generating
203
+ sheet data for each row.
204
+ </p>
199
205
  </div>
200
206
  </li>
201
207
 
@@ -208,9 +214,10 @@ sheet data for each row.</p>
208
214
  <tt>default nil</tt>
209
215
 
210
216
  </span>
211
- &mdash; <div class='inline'>
212
- <p>The path to search for localization. When this is specified your i18n.t
213
- will be used to determine the labels for columns.</p>
217
+ &mdash; <div class='inline'><p>
218
+ The path to search for localization. When this is specified your i18n.t
219
+ will be used to determine the labels for columns.
220
+ </p>
214
221
  </div>
215
222
  </li>
216
223
 
@@ -232,14 +239,15 @@ will be used to determine the labels for columns.</p>
232
239
  32</pre>
233
240
  </td>
234
241
  <td>
235
- <pre class="code"><span class="info file"># File 'lib/axlsx/acts_as_xlsx.rb', line 27</span>
236
-
237
- <span class='kw'>def</span> <span class='id acts_as_xlsx'>acts_as_xlsx</span><span class='lparen'>(</span><span class='id options'>options</span><span class='op'>=</span><span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span>
238
- <span class='id cattr_accessor'>cattr_accessor</span> <span class='symbol'>:xlsx_i18n</span><span class='comma'>,</span> <span class='symbol'>:xlsx_columns</span>
239
- <span class='kw'>self</span><span class='period'>.</span><span class='id xlsx_i18n'>xlsx_i18n</span> <span class='op'>=</span> <span class='id options'>options</span><span class='period'>.</span><span class='id delete'>delete</span><span class='lparen'>(</span><span class='symbol'>:i18n</span><span class='rparen'>)</span> <span class='op'>||</span> <span class='kw'>false</span>
240
- <span class='kw'>self</span><span class='period'>.</span><span class='id xlsx_columns'>xlsx_columns</span> <span class='op'>=</span> <span class='id options'>options</span><span class='period'>.</span><span class='id delete'>delete</span><span class='lparen'>(</span><span class='symbol'>:columns</span><span class='rparen'>)</span> <span class='op'>||</span> <span class='kw'>self</span><span class='period'>.</span><span class='id column_names'>column_names</span><span class='period'>.</span><span class='id map'>map</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id c'>c</span><span class='op'>|</span> <span class='id c'>c</span> <span class='op'>=</span> <span class='id c'>c</span><span class='period'>.</span><span class='id to_sym'>to_sym</span> <span class='rbrace'>}</span>
241
- <span class='id extend'>extend</span> <span class='const'>Axlsx</span><span class='op'>::</span><span class='const'>Ar</span><span class='op'>::</span><span class='const'>SingletonMethods</span>
242
- <span class='kw'>end</span></pre>
242
+ <pre class="code"><span class="info file"># File 'lib/acts_as_xlsx.rb', line 27</span>
243
+
244
+ <span class='def def kw'>def</span> <span class='acts_as_xlsx identifier id'>acts_as_xlsx</span><span class='lparen token'>(</span><span class='options identifier id'>options</span><span class='assign token'>=</span><span class='lbrace token'>{</span><span class='rbrace token'>}</span><span class='rparen token'>)</span>
245
+ <span class='cattr_accessor identifier id'>cattr_accessor</span> <span class='symbol val'>:xlsx_i18n</span><span class='comma token'>,</span> <span class='symbol val'>:xlsx_columns</span>
246
+ <span class='self self kw'>self</span><span class='dot token'>.</span><span class='xlsx_i18n identifier id'>xlsx_i18n</span> <span class='assign token'>=</span> <span class='options identifier id'>options</span><span class='dot token'>.</span><span class='delete identifier id'>delete</span><span class='lparen token'>(</span><span class='symbol val'>:i18n</span><span class='rparen token'>)</span> <span class='orop op'>||</span> <span class='false false kw'>false</span>
247
+ <span class='self self kw'>self</span><span class='dot token'>.</span><span class='xlsx_columns identifier id'>xlsx_columns</span> <span class='assign token'>=</span> <span class='options identifier id'>options</span><span class='dot token'>.</span><span class='delete identifier id'>delete</span><span class='lparen token'>(</span><span class='symbol val'>:columns</span><span class='rparen token'>)</span> <span class='orop op'>||</span> <span class='self self kw'>self</span><span class='dot token'>.</span><span class='column_names identifier id'>column_names</span><span class='dot token'>.</span><span class='map identifier id'>map</span> <span class='lbrace token'>{</span> <span class='bitor op'>|</span><span class='c identifier id'>c</span><span class='bitor op'>|</span> <span class='c identifier id'>c</span> <span class='assign token'>=</span> <span class='c identifier id'>c</span><span class='dot token'>.</span><span class='to_sym identifier id'>to_sym</span> <span class='rbrace token'>}</span>
248
+ <span class='extend identifier id'>extend</span> <span class='Axlsx constant id'>Axlsx</span><span class='colon2 op'>::</span><span class='Ar constant id'>Ar</span><span class='colon2 op'>::</span><span class='SingletonMethods constant id'>SingletonMethods</span>
249
+ <span class='end end kw'>end</span>
250
+ </pre>
243
251
  </td>
244
252
  </tr>
245
253
  </table>
@@ -250,9 +258,9 @@ will be used to determine the labels for columns.</p>
250
258
  </div>
251
259
 
252
260
  <div id="footer">
253
- Generated on Thu Dec 1 00:04:39 2011 by
261
+ Generated on Thu Dec 1 01:04:19 2011 by
254
262
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
255
- 0.7.3 (ruby-1.9.3).
263
+ 0.7.3 (ruby-1.8.7).
256
264
  </div>
257
265
 
258
266
  </body>
@@ -72,15 +72,16 @@
72
72
 
73
73
 
74
74
  <dt class="r1 last">Defined in:</dt>
75
- <dd class="r1 last">lib/axlsx/acts_as_xlsx.rb</dd>
75
+ <dd class="r1 last">lib/acts_as_xlsx.rb</dd>
76
76
 
77
77
  </dl>
78
78
  <div class="clear"></div>
79
79
 
80
80
  <h2>Overview</h2><div class="docstring">
81
81
  <div class="discussion">
82
-
83
- <p>Singleton methods for the mixin</p>
82
+ <p>
83
+ Singleton methods for the mixin
84
+ </p>
84
85
 
85
86
 
86
87
  </div>
@@ -117,8 +118,9 @@
117
118
 
118
119
 
119
120
 
120
- <span class="summary_desc"><div class='inline'>
121
- <p>Maps the AR class to an Axlsx package options are passed into AR find.</p>
121
+ <span class="summary_desc"><div class='inline'><p>
122
+ Maps the AR class to an Axlsx package options are passed into AR find.
123
+ </p>
122
124
  </div></span>
123
125
 
124
126
  </li>
@@ -142,8 +144,9 @@
142
144
 
143
145
  </p><div class="docstring">
144
146
  <div class="discussion">
145
-
146
- <p>Maps the AR class to an Axlsx package options are passed into AR find</p>
147
+ <p>
148
+ Maps the AR class to an Axlsx package options are passed into AR find
149
+ </p>
147
150
 
148
151
 
149
152
  </div>
@@ -162,9 +165,10 @@
162
165
 
163
166
 
164
167
  &mdash;
165
- <div class='inline'>
166
- <p>as an array of symbols or a symbol that defines the attributes or methods
167
- to render in the sheet.</p>
168
+ <div class='inline'><p>
169
+ as an array of symbols or a symbol that defines the attributes or methods
170
+ to render in the sheet.
171
+ </p>
168
172
  </div>
169
173
 
170
174
  </li>
@@ -181,8 +185,9 @@ to render in the sheet.</p>
181
185
 
182
186
 
183
187
  &mdash;
184
- <div class='inline'>
185
- <p>a customizable set of options</p>
188
+ <div class='inline'><p>
189
+ a customizable set of options
190
+ </p>
186
191
  </div>
187
192
 
188
193
  </li>
@@ -201,8 +206,9 @@ to render in the sheet.</p>
201
206
  <span class="default">
202
207
 
203
208
  </span>
204
- &mdash; <div class='inline'>
205
- <p>to apply to the first row of field names</p>
209
+ &mdash; <div class='inline'><p>
210
+ to apply to the first row of field names
211
+ </p>
206
212
  </div>
207
213
  </li>
208
214
 
@@ -212,9 +218,10 @@ to render in the sheet.</p>
212
218
  <span class="default">
213
219
 
214
220
  </span>
215
- &mdash; <div class='inline'>
216
- <p>array of Axlsx types for each cell in data rows or a single type that will
217
- be applied to all types.</p>
221
+ &mdash; <div class='inline'><p>
222
+ array of Axlsx types for each cell in data rows or a single type that will
223
+ be applied to all types.
224
+ </p>
218
225
  </div>
219
226
  </li>
220
227
 
@@ -224,8 +231,9 @@ be applied to all types.</p>
224
231
  <span class="default">
225
232
 
226
233
  </span>
227
- &mdash; <div class='inline'>
228
- <p>The style to pass to Worksheet#add_row</p>
234
+ &mdash; <div class='inline'><p>
235
+ The style to pass to Worksheet#add_row
236
+ </p>
229
237
  </div>
230
238
  </li>
231
239
 
@@ -235,8 +243,9 @@ be applied to all types.</p>
235
243
  <span class="default">
236
244
 
237
245
  </span>
238
- &mdash; <div class='inline'>
239
- <p>The path to i18n attributes. (usually activerecord.attributes)</p>
246
+ &mdash; <div class='inline'><p>
247
+ The path to i18n attributes. (usually activerecord.attributes)
248
+ </p>
240
249
  </div>
241
250
  </li>
242
251
 
@@ -293,42 +302,43 @@ be applied to all types.</p>
293
302
  79</pre>
294
303
  </td>
295
304
  <td>
296
- <pre class="code"><span class="info file"># File 'lib/axlsx/acts_as_xlsx.rb', line 46</span>
305
+ <pre class="code"><span class="info file"># File 'lib/acts_as_xlsx.rb', line 46</span>
297
306
 
298
- <span class='kw'>def</span> <span class='id to_xlsx'>to_xlsx</span><span class='lparen'>(</span><span class='id options'>options</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span>
307
+ <span class='def def kw'>def</span> <span class='to_xlsx identifier id'>to_xlsx</span><span class='lparen token'>(</span><span class='options identifier id'>options</span> <span class='assign token'>=</span> <span class='lbrace token'>{</span><span class='rbrace token'>}</span><span class='rparen token'>)</span>
299
308
 
300
- <span class='id row_style'>row_style</span> <span class='op'>=</span> <span class='id options'>options</span><span class='period'>.</span><span class='id delete'>delete</span><span class='lparen'>(</span><span class='symbol'>:style</span><span class='rparen'>)</span>
301
- <span class='id header_style'>header_style</span> <span class='op'>=</span> <span class='id options'>options</span><span class='period'>.</span><span class='id delete'>delete</span><span class='lparen'>(</span><span class='symbol'>:header_style</span><span class='rparen'>)</span> <span class='op'>||</span> <span class='id row_style'>row_style</span>
302
- <span class='id types'>types</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='id options'>options</span><span class='period'>.</span><span class='id delete'>delete</span><span class='lparen'>(</span><span class='symbol'>:types</span><span class='rparen'>)</span> <span class='op'>||</span> <span class='lbracket'>[</span><span class='rbracket'>]</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id flatten'>flatten</span>
309
+ <span class='row_style identifier id'>row_style</span> <span class='assign token'>=</span> <span class='options identifier id'>options</span><span class='dot token'>.</span><span class='delete identifier id'>delete</span><span class='lparen token'>(</span><span class='symbol val'>:style</span><span class='rparen token'>)</span>
310
+ <span class='header_style identifier id'>header_style</span> <span class='assign token'>=</span> <span class='options identifier id'>options</span><span class='dot token'>.</span><span class='delete identifier id'>delete</span><span class='lparen token'>(</span><span class='symbol val'>:header_style</span><span class='rparen token'>)</span> <span class='orop op'>||</span> <span class='row_style identifier id'>row_style</span>
311
+ <span class='types identifier id'>types</span> <span class='assign token'>=</span> <span class='lbrack token'>[</span><span class='options identifier id'>options</span><span class='dot token'>.</span><span class='delete identifier id'>delete</span><span class='lparen token'>(</span><span class='symbol val'>:types</span><span class='rparen token'>)</span> <span class='orop op'>||</span> <span class='lbrack token'>[</span><span class='rbrack token'>]</span><span class='rbrack token'>]</span><span class='dot token'>.</span><span class='flatten identifier id'>flatten</span>
303
312
 
304
- <span class='id i18n'>i18n</span> <span class='op'>=</span> <span class='id options'>options</span><span class='period'>.</span><span class='id delete'>delete</span><span class='lparen'>(</span><span class='symbol'>:i18n</span><span class='rparen'>)</span> <span class='op'>||</span> <span class='kw'>self</span><span class='period'>.</span><span class='id xlsx_i18n'>xlsx_i18n</span>
305
- <span class='id columns'>columns</span> <span class='op'>=</span> <span class='id options'>options</span><span class='period'>.</span><span class='id delete'>delete</span><span class='lparen'>(</span><span class='symbol'>:columns</span><span class='rparen'>)</span> <span class='op'>||</span> <span class='kw'>self</span><span class='period'>.</span><span class='id xlsx_columns'>xlsx_columns</span>
313
+ <span class='i18n identifier id'>i18n</span> <span class='assign token'>=</span> <span class='options identifier id'>options</span><span class='dot token'>.</span><span class='delete identifier id'>delete</span><span class='lparen token'>(</span><span class='symbol val'>:i18n</span><span class='rparen token'>)</span> <span class='orop op'>||</span> <span class='self self kw'>self</span><span class='dot token'>.</span><span class='xlsx_i18n identifier id'>xlsx_i18n</span>
314
+ <span class='columns identifier id'>columns</span> <span class='assign token'>=</span> <span class='options identifier id'>options</span><span class='dot token'>.</span><span class='delete identifier id'>delete</span><span class='lparen token'>(</span><span class='symbol val'>:columns</span><span class='rparen token'>)</span> <span class='orop op'>||</span> <span class='self self kw'>self</span><span class='dot token'>.</span><span class='xlsx_columns identifier id'>xlsx_columns</span>
306
315
 
307
- <span class='id p'>p</span> <span class='op'>=</span> <span class='const'>Package</span><span class='period'>.</span><span class='id new'>new</span>
308
- <span class='id row_style'>row_style</span> <span class='op'>=</span> <span class='id p'>p</span><span class='period'>.</span><span class='id workbook'>workbook</span><span class='period'>.</span><span class='id styles'>styles</span><span class='period'>.</span><span class='id add_style'>add_style</span><span class='lparen'>(</span><span class='id row_style'>row_style</span><span class='rparen'>)</span> <span class='kw'>unless</span> <span class='id row_style'>row_style</span><span class='period'>.</span><span class='id nil?'>nil?</span>
309
- <span class='id header_style'>header_style</span> <span class='op'>=</span> <span class='id p'>p</span><span class='period'>.</span><span class='id workbook'>workbook</span><span class='period'>.</span><span class='id styles'>styles</span><span class='period'>.</span><span class='id add_style'>add_style</span><span class='lparen'>(</span><span class='id header_style'>header_style</span><span class='rparen'>)</span> <span class='kw'>unless</span> <span class='id header_style'>header_style</span><span class='period'>.</span><span class='id nil?'>nil?</span>
316
+ <span class='p identifier id'>p</span> <span class='assign token'>=</span> <span class='Package constant id'>Package</span><span class='dot token'>.</span><span class='new identifier id'>new</span>
317
+ <span class='row_style identifier id'>row_style</span> <span class='assign token'>=</span> <span class='p identifier id'>p</span><span class='dot token'>.</span><span class='workbook identifier id'>workbook</span><span class='dot token'>.</span><span class='styles identifier id'>styles</span><span class='dot token'>.</span><span class='add_style identifier id'>add_style</span><span class='lparen token'>(</span><span class='row_style identifier id'>row_style</span><span class='rparen token'>)</span> <span class='unless unless_mod kw'>unless</span> <span class='row_style identifier id'>row_style</span><span class='dot token'>.</span><span class='nil? fid id'>nil?</span>
318
+ <span class='header_style identifier id'>header_style</span> <span class='assign token'>=</span> <span class='p identifier id'>p</span><span class='dot token'>.</span><span class='workbook identifier id'>workbook</span><span class='dot token'>.</span><span class='styles identifier id'>styles</span><span class='dot token'>.</span><span class='add_style identifier id'>add_style</span><span class='lparen token'>(</span><span class='header_style identifier id'>header_style</span><span class='rparen token'>)</span> <span class='unless unless_mod kw'>unless</span> <span class='header_style identifier id'>header_style</span><span class='dot token'>.</span><span class='nil? fid id'>nil?</span>
310
319
 
311
- <span class='id data'>data</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='op'>*</span><span class='id find'>find</span><span class='lparen'>(</span><span class='symbol'>:all</span><span class='comma'>,</span> <span class='id options'>options</span><span class='rparen'>)</span><span class='rbracket'>]</span>
312
- <span class='id data'>data</span><span class='period'>.</span><span class='id compact!'>compact!</span>
313
- <span class='id data'>data</span><span class='period'>.</span><span class='id flatten!'>flatten!</span>
320
+ <span class='data identifier id'>data</span> <span class='assign token'>=</span> <span class='lbrack token'>[</span><span class='mult op'>*</span><span class='find identifier id'>find</span><span class='lparen token'>(</span><span class='symbol val'>:all</span><span class='comma token'>,</span> <span class='options identifier id'>options</span><span class='rparen token'>)</span><span class='rbrack token'>]</span>
321
+ <span class='data identifier id'>data</span><span class='dot token'>.</span><span class='compact! fid id'>compact!</span>
322
+ <span class='data identifier id'>data</span><span class='dot token'>.</span><span class='flatten! fid id'>flatten!</span>
314
323
 
315
- <span class='kw'>return</span> <span class='id p'>p</span> <span class='kw'>if</span> <span class='id data'>data</span><span class='period'>.</span><span class='id empty?'>empty?</span>
316
- <span class='id p'>p</span><span class='period'>.</span><span class='id workbook'>workbook</span><span class='period'>.</span><span class='id add_worksheet'>add_worksheet</span><span class='lparen'>(</span><span class='symbol'>:name</span><span class='op'>=&gt;</span><span class='id table_name'>table_name</span><span class='period'>.</span><span class='id humanize'>humanize</span><span class='rparen'>)</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id sheet'>sheet</span><span class='op'>|</span>
324
+ <span class='return return kw'>return</span> <span class='p identifier id'>p</span> <span class='if if_mod kw'>if</span> <span class='data identifier id'>data</span><span class='dot token'>.</span><span class='empty? fid id'>empty?</span>
325
+ <span class='p identifier id'>p</span><span class='dot token'>.</span><span class='workbook identifier id'>workbook</span><span class='dot token'>.</span><span class='add_worksheet identifier id'>add_worksheet</span><span class='lparen token'>(</span><span class='symbol val'>:name=</span><span class='gt op'>&gt;</span><span class='table_name identifier id'>table_name</span><span class='dot token'>.</span><span class='humanize identifier id'>humanize</span><span class='rparen token'>)</span> <span class='do do kw'>do</span> <span class='bitor op'>|</span><span class='sheet identifier id'>sheet</span><span class='bitor op'>|</span>
317
326
 
318
- <span class='id col_labels'>col_labels</span> <span class='op'>=</span> <span class='kw'>if</span> <span class='id i18n'>i18n</span>
319
- <span class='id columns'>columns</span><span class='period'>.</span><span class='id map'>map</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id c'>c</span><span class='op'>|</span> <span class='const'>I18n</span><span class='period'>.</span><span class='id t'>t</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='embexpr_beg'>#{</span><span class='id i18n'>i18n</span><span class='rbrace'>}</span><span class='tstring_content'>.</span><span class='embexpr_beg'>#{</span><span class='kw'>self</span><span class='period'>.</span><span class='id name'>name</span><span class='period'>.</span><span class='id underscore'>underscore</span><span class='rbrace'>}</span><span class='tstring_content'>.</span><span class='embexpr_beg'>#{</span><span class='id c'>c</span><span class='rbrace'>}</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span> <span class='rbrace'>}</span>
320
- <span class='kw'>else</span>
321
- <span class='id columns'>columns</span><span class='period'>.</span><span class='id map'>map</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id c'>c</span><span class='op'>|</span> <span class='id c'>c</span><span class='period'>.</span><span class='id to_s'>to_s</span><span class='period'>.</span><span class='id humanize'>humanize</span> <span class='rbrace'>}</span>
322
- <span class='kw'>end</span>
327
+ <span class='col_labels identifier id'>col_labels</span> <span class='assign token'>=</span> <span class='if if kw'>if</span> <span class='i18n identifier id'>i18n</span>
328
+ <span class='columns identifier id'>columns</span><span class='dot token'>.</span><span class='map identifier id'>map</span> <span class='lbrace token'>{</span> <span class='bitor op'>|</span><span class='c identifier id'>c</span><span class='bitor op'>|</span> <span class='I18n constant id'>I18n</span><span class='dot token'>.</span><span class='t identifier id'>t</span><span class='lparen token'>(</span><span class='dstring node'>&quot;#{i18n}.#{self.name.underscore}.#{c}&quot;</span><span class='rparen token'>)</span> <span class='rbrace token'>}</span>
329
+ <span class='else else kw'>else</span>
330
+ <span class='columns identifier id'>columns</span><span class='dot token'>.</span><span class='map identifier id'>map</span> <span class='lbrace token'>{</span> <span class='bitor op'>|</span><span class='c identifier id'>c</span><span class='bitor op'>|</span> <span class='c identifier id'>c</span><span class='dot token'>.</span><span class='to_s identifier id'>to_s</span><span class='dot token'>.</span><span class='humanize identifier id'>humanize</span> <span class='rbrace token'>}</span>
331
+ <span class='end end kw'>end</span>
323
332
 
324
- <span class='id sheet'>sheet</span><span class='period'>.</span><span class='id add_row'>add_row</span> <span class='id col_labels'>col_labels</span><span class='comma'>,</span> <span class='symbol'>:style</span><span class='op'>=&gt;</span><span class='id header_style'>header_style</span>
333
+ <span class='sheet identifier id'>sheet</span><span class='dot token'>.</span><span class='add_row identifier id'>add_row</span> <span class='col_labels identifier id'>col_labels</span><span class='comma token'>,</span> <span class='symbol val'>:style=</span><span class='gt op'>&gt;</span><span class='header_style identifier id'>header_style</span>
325
334
 
326
- <span class='id data'>data</span><span class='period'>.</span><span class='id each'>each</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id r'>r</span><span class='op'>|</span>
327
- <span class='id sheet'>sheet</span><span class='period'>.</span><span class='id add_row'>add_row</span> <span class='id columns'>columns</span><span class='period'>.</span><span class='id map'>map</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id c'>c</span><span class='op'>|</span> <span class='id r'>r</span><span class='period'>.</span><span class='id send'>send</span><span class='lparen'>(</span><span class='id c'>c</span><span class='rparen'>)</span> <span class='rbrace'>}</span><span class='comma'>,</span> <span class='symbol'>:style</span><span class='op'>=&gt;</span><span class='id row_style'>row_style</span><span class='comma'>,</span> <span class='symbol'>:types</span><span class='op'>=&gt;</span><span class='id types'>types</span>
328
- <span class='kw'>end</span>
329
- <span class='kw'>end</span>
330
- <span class='id p'>p</span>
331
- <span class='kw'>end</span></pre>
335
+ <span class='data identifier id'>data</span><span class='dot token'>.</span><span class='each identifier id'>each</span> <span class='do do kw'>do</span> <span class='bitor op'>|</span><span class='r identifier id'>r</span><span class='bitor op'>|</span>
336
+ <span class='sheet identifier id'>sheet</span><span class='dot token'>.</span><span class='add_row identifier id'>add_row</span> <span class='columns identifier id'>columns</span><span class='dot token'>.</span><span class='map identifier id'>map</span> <span class='lbrace token'>{</span> <span class='bitor op'>|</span><span class='c identifier id'>c</span><span class='bitor op'>|</span> <span class='r identifier id'>r</span><span class='dot token'>.</span><span class='send identifier id'>send</span><span class='lparen token'>(</span><span class='c identifier id'>c</span><span class='rparen token'>)</span> <span class='rbrace token'>}</span><span class='comma token'>,</span> <span class='symbol val'>:style=</span><span class='gt op'>&gt;</span><span class='row_style identifier id'>row_style</span><span class='comma token'>,</span> <span class='symbol val'>:types=</span><span class='gt op'>&gt;</span><span class='types identifier id'>types</span>
337
+ <span class='end end kw'>end</span>
338
+ <span class='end end kw'>end</span>
339
+ <span class='p identifier id'>p</span>
340
+ <span class='end end kw'>end</span>
341
+ </pre>
332
342
  </td>
333
343
  </tr>
334
344
  </table>
@@ -339,9 +349,9 @@ be applied to all types.</p>
339
349
  </div>
340
350
 
341
351
  <div id="footer">
342
- Generated on Thu Dec 1 00:04:39 2011 by
352
+ Generated on Thu Dec 1 01:04:20 2011 by
343
353
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
344
- 0.7.3 (ruby-1.9.3).
354
+ 0.7.3 (ruby-1.8.7).
345
355
  </div>
346
356
 
347
357
  </body>
data/doc/Axlsx/Ar.html CHANGED
@@ -72,18 +72,18 @@
72
72
 
73
73
 
74
74
  <dt class="r1 last">Defined in:</dt>
75
- <dd class="r1 last">lib/axlsx/acts_as_xlsx.rb</dd>
75
+ <dd class="r1 last">lib/acts_as_xlsx.rb</dd>
76
76
 
77
77
  </dl>
78
78
  <div class="clear"></div>
79
79
 
80
80
  <h2>Overview</h2><div class="docstring">
81
81
  <div class="discussion">
82
-
83
- <h3>Overview</h3>
84
-
85
- <p>This module defines the acts_as_xlsx class method and provides to_xlsx
86
- support to both AR classes and instances</p>
82
+ <h3>Overview</h3>
83
+ <p>
84
+ This module defines the acts_as_xlsx class method and provides to_xlsx
85
+ support to both AR classes and instances
86
+ </p>
87
87
 
88
88
 
89
89
  </div>
@@ -130,8 +130,9 @@ support to both AR classes and instances</p>
130
130
 
131
131
 
132
132
 
133
- <span class="summary_desc"><div class='inline'>
134
- <p>:nodoc:.</p>
133
+ <span class="summary_desc"><div class='inline'><p>
134
+ :nodoc:.
135
+ </p>
135
136
  </div></span>
136
137
 
137
138
  </li>
@@ -155,8 +156,9 @@ support to both AR classes and instances</p>
155
156
 
156
157
  </p><div class="docstring">
157
158
  <div class="discussion">
158
-
159
- <p>:nodoc:</p>
159
+ <p>
160
+ :nodoc:
161
+ </p>
160
162
 
161
163
 
162
164
  </div>
@@ -175,11 +177,12 @@ support to both AR classes and instances</p>
175
177
  16</pre>
176
178
  </td>
177
179
  <td>
178
- <pre class="code"><span class="info file"># File 'lib/axlsx/acts_as_xlsx.rb', line 14</span>
180
+ <pre class="code"><span class="info file"># File 'lib/acts_as_xlsx.rb', line 14</span>
179
181
 
180
- <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id included'>included</span><span class='lparen'>(</span><span class='id base'>base</span><span class='rparen'>)</span> <span class='comment'># :nodoc:
181
- </span> <span class='id base'>base</span><span class='period'>.</span><span class='id send'>send</span> <span class='symbol'>:extend</span><span class='comma'>,</span> <span class='const'>ClassMethods</span>
182
- <span class='kw'>end</span></pre>
182
+ <span class='def def kw'>def</span> <span class='self self kw'>self</span><span class='dot token'>.</span><span class='included identifier id'>included</span><span class='lparen token'>(</span><span class='base identifier id'>base</span><span class='rparen token'>)</span> <span class='comment val'># :nodoc:</span>
183
+ <span class='base identifier id'>base</span><span class='dot token'>.</span><span class='send identifier id'>send</span> <span class='symbol val'>:extend</span><span class='comma token'>,</span> <span class='ClassMethods constant id'>ClassMethods</span>
184
+ <span class='end end kw'>end</span>
185
+ </pre>
183
186
  </td>
184
187
  </tr>
185
188
  </table>
@@ -190,9 +193,9 @@ support to both AR classes and instances</p>
190
193
  </div>
191
194
 
192
195
  <div id="footer">
193
- Generated on Thu Dec 1 00:04:39 2011 by
196
+ Generated on Thu Dec 1 01:04:19 2011 by
194
197
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
195
- 0.7.3 (ruby-1.9.3).
198
+ 0.7.3 (ruby-1.8.7).
196
199
  </div>
197
200
 
198
201
  </body>
data/doc/Axlsx.html CHANGED
@@ -72,15 +72,16 @@
72
72
 
73
73
 
74
74
  <dt class="r1 last">Defined in:</dt>
75
- <dd class="r1 last">lib/axlsx/acts_as_xlsx.rb</dd>
75
+ <dd class="r1 last">lib/acts_as_xlsx.rb</dd>
76
76
 
77
77
  </dl>
78
78
  <div class="clear"></div>
79
79
 
80
80
  <h2>Overview</h2><div class="docstring">
81
81
  <div class="discussion">
82
-
83
- <p>Adding to the Axlsx module</p>
82
+ <p>
83
+ Adding to the Axlsx module
84
+ </p>
84
85
 
85
86
 
86
87
  </div>
@@ -115,9 +116,9 @@
115
116
  </div>
116
117
 
117
118
  <div id="footer">
118
- Generated on Thu Dec 1 00:04:39 2011 by
119
+ Generated on Thu Dec 1 01:04:19 2011 by
119
120
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
120
- 0.7.3 (ruby-1.9.3).
121
+ 0.7.3 (ruby-1.8.7).
121
122
  </div>
122
123
 
123
124
  </body>
data/doc/_index.html CHANGED
@@ -137,9 +137,9 @@
137
137
  </div>
138
138
 
139
139
  <div id="footer">
140
- Generated on Thu Dec 1 00:04:39 2011 by
140
+ Generated on Thu Dec 1 01:04:19 2011 by
141
141
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
142
- 0.7.3 (ruby-1.9.3).
142
+ 0.7.3 (ruby-1.8.7).
143
143
  </div>
144
144
 
145
145
  </body>