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 +16 -4
- data/README.md +12 -3
- data/acts_as_xlsx.gemspec +1 -1
- data/doc/Axlsx/Ar/ClassMethods.html +35 -27
- data/doc/Axlsx/Ar/SingletonMethods.html +60 -50
- data/doc/Axlsx/Ar.html +19 -16
- data/doc/Axlsx.html +6 -5
- data/doc/_index.html +2 -2
- data/doc/file.LICENSE.html +28 -23
- data/doc/file.README.html +45 -28
- data/doc/index.html +45 -28
- data/doc/top-level-namespace.html +2 -2
- data/lib/{axlsx/acts_as_xlsx.rb → acts_as_xlsx.rb} +0 -0
- data/test/acts_as_xlsx.sqlite3.db +0 -0
- data/test/tc_acts_as_xlsx.rb +1 -1
- metadata +120 -75
data/Gemfile.lock
CHANGED
@@ -1,21 +1,33 @@
|
|
1
1
|
GEM
|
2
2
|
remote: http://rubygems.org/
|
3
3
|
specs:
|
4
|
-
|
5
|
-
activesupport (=
|
6
|
-
|
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.
|
10
|
+
**Latest Version**: 1.0.1
|
11
11
|
**Ruby Version**: 1.8.7 - 1.9.3
|
12
|
-
**Release Date**:
|
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
|
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
@@ -72,15 +72,16 @@
|
|
72
72
|
|
73
73
|
|
74
74
|
<dt class="r1 last">Defined in:</dt>
|
75
|
-
<dd class="r1 last">lib/
|
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
|
-
|
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
|
-
|
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
|
-
|
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
|
158
|
-
acts_as_xlsx
|
160
|
+
<pre class="example code"><span class='class class kw'>class</span> <span class='MyModel constant id'>MyModel</span> <span class='lt op'><</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'>></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'>></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
|
—
|
176
|
-
<div class='inline'>
|
177
|
-
|
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
|
-
— <div class='inline'>
|
197
|
-
|
198
|
-
sheet data for each row
|
201
|
+
— <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
|
-
— <div class='inline'>
|
212
|
-
|
213
|
-
will be used to determine the labels for columns
|
217
|
+
— <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/
|
236
|
-
|
237
|
-
<span class='kw'>def</span> <span class='id
|
238
|
-
<span class='id
|
239
|
-
<span class='kw'>self</span><span class='
|
240
|
-
<span class='kw'>self</span><span class='
|
241
|
-
<span class='id
|
242
|
-
<span class='kw'>end</span
|
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
|
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.
|
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/
|
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
|
-
|
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
|
-
|
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
|
-
|
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
|
—
|
165
|
-
<div class='inline'>
|
166
|
-
|
167
|
-
to render in the sheet
|
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
|
—
|
184
|
-
<div class='inline'>
|
185
|
-
|
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
|
-
— <div class='inline'>
|
205
|
-
|
209
|
+
— <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
|
-
— <div class='inline'>
|
216
|
-
|
217
|
-
be applied to all types
|
221
|
+
— <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
|
-
— <div class='inline'>
|
228
|
-
|
234
|
+
— <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
|
-
— <div class='inline'>
|
239
|
-
|
246
|
+
— <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/
|
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
|
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
|
301
|
-
<span class='id
|
302
|
-
<span class='id
|
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
|
305
|
-
<span class='id
|
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
|
308
|
-
<span class='id
|
309
|
-
<span class='id
|
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
|
312
|
-
<span class='id
|
313
|
-
<span class='id
|
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
|
316
|
-
<span class='id
|
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'>></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
|
319
|
-
<span class='id
|
320
|
-
<span class='kw'>else</span>
|
321
|
-
<span class='id
|
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'>"#{i18n}.#{self.name.underscore}.#{c}"</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
|
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'>></span><span class='header_style identifier id'>header_style</span>
|
325
334
|
|
326
|
-
<span class='id
|
327
|
-
<span class='id
|
328
|
-
<span class='kw'>end</span>
|
329
|
-
<span class='kw'>end</span>
|
330
|
-
<span class='id
|
331
|
-
<span class='kw'>end</span
|
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'>></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'>></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
|
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.
|
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/
|
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
|
-
<
|
84
|
-
|
85
|
-
|
86
|
-
|
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
|
-
|
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
|
-
|
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/
|
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='
|
181
|
-
|
182
|
-
<span class='kw'>end</span
|
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
|
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.
|
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/
|
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
|
-
|
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
|
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.
|
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
|
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.
|
142
|
+
0.7.3 (ruby-1.8.7).
|
143
143
|
</div>
|
144
144
|
|
145
145
|
</body>
|