box-api 0.1.7 → 0.1.8
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile.lock +1 -1
- data/box-api.gemspec +1 -1
- data/doc/Box.html +108 -0
- data/doc/Box/Account.html +1099 -0
- data/doc/Box/Api.html +3428 -0
- data/doc/Box/Api/AccountExceeded.html +130 -0
- data/doc/Box/Api/EmailInvalid.html +141 -0
- data/doc/Box/Api/EmailTaken.html +130 -0
- data/doc/Box/Api/ErrorStatus.html +130 -0
- data/doc/Box/Api/Exception.html +120 -0
- data/doc/Box/Api/Generic.html +130 -0
- data/doc/Box/Api/InvalidFolder.html +141 -0
- data/doc/Box/Api/InvalidInput.html +130 -0
- data/doc/Box/Api/InvalidName.html +130 -0
- data/doc/Box/Api/NameTaken.html +130 -0
- data/doc/Box/Api/NoAccess.html +130 -0
- data/doc/Box/Api/NoParent.html +130 -0
- data/doc/Box/Api/NotAuthorized.html +130 -0
- data/doc/Box/Api/Restricted.html +141 -0
- data/doc/Box/Api/SizeExceeded.html +130 -0
- data/doc/Box/Api/Unknown.html +130 -0
- data/doc/Box/Api/UnknownResponse.html +141 -0
- data/doc/Box/Api/UploadFailed.html +141 -0
- data/doc/Box/File.html +580 -0
- data/doc/Box/Folder.html +1078 -0
- data/doc/Box/Item.html +1884 -0
- data/doc/_index.html +342 -0
- data/doc/class_list.html +47 -0
- data/doc/css/common.css +1 -0
- data/doc/css/full_list.css +53 -0
- data/doc/css/style.css +320 -0
- data/doc/file.README.html +98 -0
- data/doc/file_list.html +49 -0
- data/doc/frames.html +13 -0
- data/doc/index.html +98 -0
- data/doc/js/app.js +205 -0
- data/doc/js/full_list.js +150 -0
- data/doc/js/jquery.js +16 -0
- data/doc/method_list.html +574 -0
- data/doc/top-level-namespace.html +103 -0
- data/examples/login.rb +4 -4
- data/lib/box/account.rb +168 -51
- data/lib/box/api.rb +174 -16
- data/lib/box/api/exceptions.rb +4 -0
- data/lib/box/file.rb +17 -4
- data/lib/box/folder.rb +85 -30
- data/lib/box/item.rb +89 -20
- data/spec/account_spec.rb +0 -4
- data/spec/folder_spec.rb +3 -9
- metadata +42 -4
data/doc/Box/Item.html
ADDED
@@ -0,0 +1,1884 @@
|
|
1
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
2
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
3
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
4
|
+
<head>
|
5
|
+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
6
|
+
<title>
|
7
|
+
Class: Box::Item
|
8
|
+
|
9
|
+
— Documentation by YARD 0.7.2
|
10
|
+
|
11
|
+
</title>
|
12
|
+
|
13
|
+
<link rel="stylesheet" href="../css/style.css" type="text/css" media="screen" charset="utf-8" />
|
14
|
+
|
15
|
+
<link rel="stylesheet" href="../css/common.css" type="text/css" media="screen" charset="utf-8" />
|
16
|
+
|
17
|
+
<script type="text/javascript" charset="utf-8">
|
18
|
+
relpath = '..';
|
19
|
+
if (relpath != '') relpath += '/';
|
20
|
+
</script>
|
21
|
+
|
22
|
+
<script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
|
23
|
+
|
24
|
+
<script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
|
25
|
+
|
26
|
+
|
27
|
+
</head>
|
28
|
+
<body>
|
29
|
+
<script type="text/javascript" charset="utf-8">
|
30
|
+
if (window.top.frames.main) document.body.className = 'frames';
|
31
|
+
</script>
|
32
|
+
|
33
|
+
<div id="header">
|
34
|
+
<div id="menu">
|
35
|
+
|
36
|
+
<a href="../_index.html">Index (I)</a> »
|
37
|
+
<span class='title'><span class='object_link'><a href="../Box.html" title="Box (module)">Box</a></span></span>
|
38
|
+
»
|
39
|
+
<span class="title">Item</span>
|
40
|
+
|
41
|
+
|
42
|
+
<div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
|
43
|
+
</div>
|
44
|
+
|
45
|
+
<div id="search">
|
46
|
+
|
47
|
+
<a id="class_list_link" href="#">Class List</a>
|
48
|
+
|
49
|
+
<a id="method_list_link" href="#">Method List</a>
|
50
|
+
|
51
|
+
<a id="file_list_link" href="#">File List</a>
|
52
|
+
|
53
|
+
</div>
|
54
|
+
<div class="clear"></div>
|
55
|
+
</div>
|
56
|
+
|
57
|
+
<iframe id="search_frame"></iframe>
|
58
|
+
|
59
|
+
<div id="content"><h1>Class: Box::Item
|
60
|
+
|
61
|
+
|
62
|
+
|
63
|
+
</h1>
|
64
|
+
|
65
|
+
<dl class="box">
|
66
|
+
|
67
|
+
<dt class="r1">Inherits:</dt>
|
68
|
+
<dd class="r1">
|
69
|
+
<span class="inheritName">Object</span>
|
70
|
+
|
71
|
+
<ul class="fullTree">
|
72
|
+
<li>Object</li>
|
73
|
+
|
74
|
+
<li class="next">Box::Item</li>
|
75
|
+
|
76
|
+
</ul>
|
77
|
+
<a href="#" class="inheritanceTree">show all</a>
|
78
|
+
|
79
|
+
</dd>
|
80
|
+
|
81
|
+
|
82
|
+
|
83
|
+
|
84
|
+
|
85
|
+
|
86
|
+
|
87
|
+
|
88
|
+
|
89
|
+
<dt class="r2 last">Defined in:</dt>
|
90
|
+
<dd class="r2 last">lib/box/item.rb</dd>
|
91
|
+
|
92
|
+
</dl>
|
93
|
+
<div class="clear"></div>
|
94
|
+
|
95
|
+
<h2>Overview</h2><div class="docstring">
|
96
|
+
<div class="discussion">
|
97
|
+
<p>
|
98
|
+
Represents a folder or file stored on Box. Any attributes or actions
|
99
|
+
typical to a Box item can be accessed through this class. The <span class='object_link'><a href="" title="Box::Item (class)">Item</a></span> class
|
100
|
+
contains only methods shared by <span class='object_link'><a href="Folder.html" title="Box::Folder (class)">Folder</a></span> and <span class='object_link'><a href="File.html" title="Box::File (class)">File</a></span>, and should not be
|
101
|
+
instanciated directly.
|
102
|
+
</p>
|
103
|
+
|
104
|
+
|
105
|
+
</div>
|
106
|
+
</div>
|
107
|
+
<div class="tags">
|
108
|
+
|
109
|
+
</div><div id="subclasses">
|
110
|
+
<h2>Direct Known Subclasses</h2>
|
111
|
+
<p class="children"><span class='object_link'><a href="File.html" title="Box::File (class)">File</a></span>, <span class='object_link'><a href="Folder.html" title="Box::Folder (class)">Folder</a></span></p>
|
112
|
+
</div>
|
113
|
+
|
114
|
+
|
115
|
+
<h2>Instance Attribute Summary <small>(<a href="#" class="summary_toggle">collapse</a>)</small></h2>
|
116
|
+
<ul class="summary">
|
117
|
+
|
118
|
+
<li class="public ">
|
119
|
+
<span class="summary_signature">
|
120
|
+
|
121
|
+
<a href="#api-instance_method" title="#api (instance method)">- (Api) <strong>api</strong> </a>
|
122
|
+
|
123
|
+
|
124
|
+
|
125
|
+
</span>
|
126
|
+
|
127
|
+
|
128
|
+
|
129
|
+
|
130
|
+
|
131
|
+
|
132
|
+
|
133
|
+
|
134
|
+
|
135
|
+
|
136
|
+
|
137
|
+
<span class="summary_desc"><div class='inline'><p>
|
138
|
+
The <span class='object_link'><a href="Api.html" title="Box::Api (class)">Api</a></span> used by this item.
|
139
|
+
</p>
|
140
|
+
</div></span>
|
141
|
+
|
142
|
+
</li>
|
143
|
+
|
144
|
+
|
145
|
+
<li class="public ">
|
146
|
+
<span class="summary_signature">
|
147
|
+
|
148
|
+
<a href="#data-instance_method" title="#data (instance method)">- (Hash) <strong>data</strong> </a>
|
149
|
+
|
150
|
+
|
151
|
+
|
152
|
+
</span>
|
153
|
+
|
154
|
+
|
155
|
+
|
156
|
+
|
157
|
+
|
158
|
+
|
159
|
+
|
160
|
+
|
161
|
+
|
162
|
+
|
163
|
+
|
164
|
+
<span class="summary_desc"><div class='inline'><p>
|
165
|
+
The hash of info for this item.
|
166
|
+
</p>
|
167
|
+
</div></span>
|
168
|
+
|
169
|
+
</li>
|
170
|
+
|
171
|
+
|
172
|
+
<li class="public ">
|
173
|
+
<span class="summary_signature">
|
174
|
+
|
175
|
+
<a href="#parent-instance_method" title="#parent (instance method)">- (Folder) <strong>parent</strong> </a>
|
176
|
+
|
177
|
+
|
178
|
+
|
179
|
+
</span>
|
180
|
+
|
181
|
+
|
182
|
+
|
183
|
+
|
184
|
+
|
185
|
+
|
186
|
+
|
187
|
+
|
188
|
+
|
189
|
+
|
190
|
+
|
191
|
+
<span class="summary_desc"><div class='inline'><p>
|
192
|
+
The parent of this item.
|
193
|
+
</p>
|
194
|
+
</div></span>
|
195
|
+
|
196
|
+
</li>
|
197
|
+
|
198
|
+
|
199
|
+
</ul>
|
200
|
+
|
201
|
+
|
202
|
+
|
203
|
+
|
204
|
+
|
205
|
+
<h2>
|
206
|
+
Class Method Summary
|
207
|
+
<small>(<a href="#" class="summary_toggle">collapse</a>)</small>
|
208
|
+
</h2>
|
209
|
+
|
210
|
+
<ul class="summary">
|
211
|
+
|
212
|
+
<li class="public ">
|
213
|
+
<span class="summary_signature">
|
214
|
+
|
215
|
+
<a href="#type-class_method" title="type (class method)">+ (String) <strong>type</strong> </a>
|
216
|
+
|
217
|
+
|
218
|
+
|
219
|
+
</span>
|
220
|
+
|
221
|
+
|
222
|
+
|
223
|
+
|
224
|
+
|
225
|
+
|
226
|
+
|
227
|
+
|
228
|
+
<span class="summary_desc"><div class='inline'><p>
|
229
|
+
The string representation of this item.
|
230
|
+
</p>
|
231
|
+
</div></span>
|
232
|
+
|
233
|
+
</li>
|
234
|
+
|
235
|
+
|
236
|
+
<li class="public ">
|
237
|
+
<span class="summary_signature">
|
238
|
+
|
239
|
+
<a href="#types-class_method" title="types (class method)">+ (String) <strong>types</strong> </a>
|
240
|
+
|
241
|
+
|
242
|
+
|
243
|
+
</span>
|
244
|
+
|
245
|
+
|
246
|
+
|
247
|
+
|
248
|
+
|
249
|
+
|
250
|
+
|
251
|
+
|
252
|
+
<span class="summary_desc"><div class='inline'><p>
|
253
|
+
The plural string representation of this item.
|
254
|
+
</p>
|
255
|
+
</div></span>
|
256
|
+
|
257
|
+
</li>
|
258
|
+
|
259
|
+
|
260
|
+
</ul>
|
261
|
+
|
262
|
+
<h2>
|
263
|
+
Instance Method Summary
|
264
|
+
<small>(<a href="#" class="summary_toggle">collapse</a>)</small>
|
265
|
+
</h2>
|
266
|
+
|
267
|
+
<ul class="summary">
|
268
|
+
|
269
|
+
<li class="public ">
|
270
|
+
<span class="summary_signature">
|
271
|
+
|
272
|
+
<a href="#copy-instance_method" title="#copy (instance method)">- (Item) <strong>copy</strong>(destination) </a>
|
273
|
+
|
274
|
+
|
275
|
+
|
276
|
+
</span>
|
277
|
+
|
278
|
+
|
279
|
+
|
280
|
+
|
281
|
+
|
282
|
+
|
283
|
+
|
284
|
+
|
285
|
+
<span class="summary_desc"><div class='inline'><p>
|
286
|
+
Copy this item to the destination folder.
|
287
|
+
</p>
|
288
|
+
</div></span>
|
289
|
+
|
290
|
+
</li>
|
291
|
+
|
292
|
+
|
293
|
+
<li class="public ">
|
294
|
+
<span class="summary_signature">
|
295
|
+
|
296
|
+
<a href="#delete-instance_method" title="#delete (instance method)">- (Item) <strong>delete</strong> </a>
|
297
|
+
|
298
|
+
|
299
|
+
|
300
|
+
</span>
|
301
|
+
|
302
|
+
|
303
|
+
|
304
|
+
|
305
|
+
|
306
|
+
|
307
|
+
|
308
|
+
|
309
|
+
<span class="summary_desc"><div class='inline'><p>
|
310
|
+
Delete this item and all sub-items.
|
311
|
+
</p>
|
312
|
+
</div></span>
|
313
|
+
|
314
|
+
</li>
|
315
|
+
|
316
|
+
|
317
|
+
<li class="public ">
|
318
|
+
<span class="summary_signature">
|
319
|
+
|
320
|
+
<a href="#description-instance_method" title="#description (instance method)">- (Item) <strong>description</strong>(message) </a>
|
321
|
+
|
322
|
+
|
323
|
+
|
324
|
+
</span>
|
325
|
+
|
326
|
+
|
327
|
+
|
328
|
+
|
329
|
+
|
330
|
+
|
331
|
+
|
332
|
+
|
333
|
+
<span class="summary_desc"><div class='inline'><p>
|
334
|
+
Set the description of this item.
|
335
|
+
</p>
|
336
|
+
</div></span>
|
337
|
+
|
338
|
+
</li>
|
339
|
+
|
340
|
+
|
341
|
+
<li class="public ">
|
342
|
+
<span class="summary_signature">
|
343
|
+
|
344
|
+
<a href="#force_cached_info-instance_method" title="#force_cached_info (instance method)">- (Object) <strong>force_cached_info</strong> </a>
|
345
|
+
|
346
|
+
|
347
|
+
|
348
|
+
</span>
|
349
|
+
|
350
|
+
|
351
|
+
|
352
|
+
|
353
|
+
|
354
|
+
|
355
|
+
|
356
|
+
|
357
|
+
<span class="summary_desc"><div class='inline'><p>
|
358
|
+
Consider the item cached.
|
359
|
+
</p>
|
360
|
+
</div></span>
|
361
|
+
|
362
|
+
</li>
|
363
|
+
|
364
|
+
|
365
|
+
<li class="public ">
|
366
|
+
<span class="summary_signature">
|
367
|
+
|
368
|
+
<a href="#id-instance_method" title="#id (instance method)">- (String) <strong>id</strong> </a>
|
369
|
+
|
370
|
+
|
371
|
+
|
372
|
+
</span>
|
373
|
+
|
374
|
+
|
375
|
+
|
376
|
+
|
377
|
+
|
378
|
+
|
379
|
+
|
380
|
+
|
381
|
+
<span class="summary_desc"><div class='inline'><p>
|
382
|
+
The id of this item.
|
383
|
+
</p>
|
384
|
+
</div></span>
|
385
|
+
|
386
|
+
</li>
|
387
|
+
|
388
|
+
|
389
|
+
<li class="public ">
|
390
|
+
<span class="summary_signature">
|
391
|
+
|
392
|
+
<a href="#info-instance_method" title="#info (instance method)">- (Item) <strong>info</strong>(refresh = false) </a>
|
393
|
+
|
394
|
+
|
395
|
+
|
396
|
+
</span>
|
397
|
+
|
398
|
+
|
399
|
+
|
400
|
+
|
401
|
+
|
402
|
+
|
403
|
+
|
404
|
+
|
405
|
+
<span class="summary_desc"><div class='inline'><p>
|
406
|
+
Get the info for this item.
|
407
|
+
</p>
|
408
|
+
</div></span>
|
409
|
+
|
410
|
+
</li>
|
411
|
+
|
412
|
+
|
413
|
+
<li class="public ">
|
414
|
+
<span class="summary_signature">
|
415
|
+
|
416
|
+
<a href="#initialize-instance_method" title="#initialize (instance method)">- (Item) <strong>initialize</strong>(api, parent, info) </a>
|
417
|
+
|
418
|
+
|
419
|
+
|
420
|
+
</span>
|
421
|
+
|
422
|
+
<span class="note title constructor">constructor</span>
|
423
|
+
|
424
|
+
|
425
|
+
|
426
|
+
|
427
|
+
|
428
|
+
|
429
|
+
|
430
|
+
|
431
|
+
<span class="summary_desc"><div class='inline'><p>
|
432
|
+
Create a new item representing either a file or folder.
|
433
|
+
</p>
|
434
|
+
</div></span>
|
435
|
+
|
436
|
+
</li>
|
437
|
+
|
438
|
+
|
439
|
+
<li class="public ">
|
440
|
+
<span class="summary_signature">
|
441
|
+
|
442
|
+
<a href="#method_missing-instance_method" title="#method_missing (instance method)">- (Object) <strong>method_missing</strong>(sym, *args, &block) </a>
|
443
|
+
|
444
|
+
|
445
|
+
|
446
|
+
</span>
|
447
|
+
|
448
|
+
|
449
|
+
|
450
|
+
|
451
|
+
|
452
|
+
|
453
|
+
|
454
|
+
|
455
|
+
<span class="summary_desc"><div class='inline'><p>
|
456
|
+
Provides an easy way to access this item’s info.
|
457
|
+
</p>
|
458
|
+
</div></span>
|
459
|
+
|
460
|
+
</li>
|
461
|
+
|
462
|
+
|
463
|
+
<li class="public ">
|
464
|
+
<span class="summary_signature">
|
465
|
+
|
466
|
+
<a href="#move-instance_method" title="#move (instance method)">- (Item) <strong>move</strong>(destination) </a>
|
467
|
+
|
468
|
+
|
469
|
+
|
470
|
+
</span>
|
471
|
+
|
472
|
+
|
473
|
+
|
474
|
+
|
475
|
+
|
476
|
+
|
477
|
+
|
478
|
+
|
479
|
+
<span class="summary_desc"><div class='inline'><p>
|
480
|
+
Move this item to the destination folder.
|
481
|
+
</p>
|
482
|
+
</div></span>
|
483
|
+
|
484
|
+
</li>
|
485
|
+
|
486
|
+
|
487
|
+
<li class="public ">
|
488
|
+
<span class="summary_signature">
|
489
|
+
|
490
|
+
<a href="#path-instance_method" title="#path (instance method)">- (String) <strong>path</strong> </a>
|
491
|
+
|
492
|
+
|
493
|
+
|
494
|
+
</span>
|
495
|
+
|
496
|
+
|
497
|
+
|
498
|
+
|
499
|
+
|
500
|
+
|
501
|
+
|
502
|
+
|
503
|
+
<span class="summary_desc"><div class='inline'><p>
|
504
|
+
The path of this item.
|
505
|
+
</p>
|
506
|
+
</div></span>
|
507
|
+
|
508
|
+
</li>
|
509
|
+
|
510
|
+
|
511
|
+
<li class="public ">
|
512
|
+
<span class="summary_signature">
|
513
|
+
|
514
|
+
<a href="#rename-instance_method" title="#rename (instance method)">- (Item) <strong>rename</strong>(new_name) </a>
|
515
|
+
|
516
|
+
|
517
|
+
|
518
|
+
</span>
|
519
|
+
|
520
|
+
|
521
|
+
|
522
|
+
|
523
|
+
|
524
|
+
|
525
|
+
|
526
|
+
|
527
|
+
<span class="summary_desc"><div class='inline'><p>
|
528
|
+
Rename this item.
|
529
|
+
</p>
|
530
|
+
</div></span>
|
531
|
+
|
532
|
+
</li>
|
533
|
+
|
534
|
+
|
535
|
+
<li class="public ">
|
536
|
+
<span class="summary_signature">
|
537
|
+
|
538
|
+
<a href="#type-instance_method" title="#type (instance method)">- (String) <strong>type</strong> </a>
|
539
|
+
|
540
|
+
|
541
|
+
|
542
|
+
</span>
|
543
|
+
|
544
|
+
|
545
|
+
|
546
|
+
|
547
|
+
|
548
|
+
|
549
|
+
|
550
|
+
|
551
|
+
<span class="summary_desc"><div class='inline'><p>
|
552
|
+
The string representation of this item.
|
553
|
+
</p>
|
554
|
+
</div></span>
|
555
|
+
|
556
|
+
</li>
|
557
|
+
|
558
|
+
|
559
|
+
<li class="public ">
|
560
|
+
<span class="summary_signature">
|
561
|
+
|
562
|
+
<a href="#types-instance_method" title="#types (instance method)">- (String) <strong>types</strong> </a>
|
563
|
+
|
564
|
+
|
565
|
+
|
566
|
+
</span>
|
567
|
+
|
568
|
+
|
569
|
+
|
570
|
+
|
571
|
+
|
572
|
+
|
573
|
+
|
574
|
+
|
575
|
+
<span class="summary_desc"><div class='inline'><p>
|
576
|
+
The plural string representation of this item.
|
577
|
+
</p>
|
578
|
+
</div></span>
|
579
|
+
|
580
|
+
</li>
|
581
|
+
|
582
|
+
|
583
|
+
</ul>
|
584
|
+
|
585
|
+
|
586
|
+
<div id="constructor_details" class="method_details_list">
|
587
|
+
<h2>Constructor Details</h2>
|
588
|
+
|
589
|
+
<div class="method_details first">
|
590
|
+
<p class="signature first" id="initialize-instance_method">
|
591
|
+
|
592
|
+
- (<tt><span class='object_link'><a href="" title="Box::Item (class)">Item</a></span></tt>) <strong>initialize</strong>(api, parent, info)
|
593
|
+
|
594
|
+
|
595
|
+
|
596
|
+
</p><div class="docstring">
|
597
|
+
<div class="discussion">
|
598
|
+
<p>
|
599
|
+
Create a new item representing either a file or folder.
|
600
|
+
</p>
|
601
|
+
|
602
|
+
|
603
|
+
</div>
|
604
|
+
</div>
|
605
|
+
<div class="tags">
|
606
|
+
<h3>Parameters:</h3>
|
607
|
+
<ul class="param">
|
608
|
+
|
609
|
+
<li>
|
610
|
+
|
611
|
+
<span class='name'>api</span>
|
612
|
+
|
613
|
+
|
614
|
+
<span class='type'>(<tt><span class='object_link'><a href="Api.html" title="Box::Api (class)">Api</a></span></tt>)</span>
|
615
|
+
|
616
|
+
|
617
|
+
|
618
|
+
—
|
619
|
+
<div class='inline'><p>
|
620
|
+
The <span class='object_link'><a href="Api.html" title="Box::Api (class)">Api</a></span> instance used to generate requests.
|
621
|
+
</p>
|
622
|
+
</div>
|
623
|
+
|
624
|
+
</li>
|
625
|
+
|
626
|
+
<li>
|
627
|
+
|
628
|
+
<span class='name'>parent</span>
|
629
|
+
|
630
|
+
|
631
|
+
<span class='type'>(<tt><span class='object_link'><a href="Folder.html" title="Box::Folder (class)">Folder</a></span></tt>)</span>
|
632
|
+
|
633
|
+
|
634
|
+
|
635
|
+
—
|
636
|
+
<div class='inline'><p>
|
637
|
+
The <span class='object_link'><a href="Folder.html" title="Box::Folder (class)">Folder</a></span> parent of this item.
|
638
|
+
</p>
|
639
|
+
</div>
|
640
|
+
|
641
|
+
</li>
|
642
|
+
|
643
|
+
<li>
|
644
|
+
|
645
|
+
<span class='name'>info</span>
|
646
|
+
|
647
|
+
|
648
|
+
<span class='type'>(<tt>Hash</tt>)</span>
|
649
|
+
|
650
|
+
|
651
|
+
|
652
|
+
—
|
653
|
+
<div class='inline'><p>
|
654
|
+
The hash of initial info for this item.
|
655
|
+
</p>
|
656
|
+
</div>
|
657
|
+
|
658
|
+
</li>
|
659
|
+
|
660
|
+
</ul>
|
661
|
+
|
662
|
+
</div><table class="source_code">
|
663
|
+
<tr>
|
664
|
+
<td>
|
665
|
+
<pre class="lines">
|
666
|
+
|
667
|
+
|
668
|
+
22
|
669
|
+
23
|
670
|
+
24
|
671
|
+
25
|
672
|
+
26
|
673
|
+
27
|
674
|
+
28</pre>
|
675
|
+
</td>
|
676
|
+
<td>
|
677
|
+
<pre class="code"><span class="info file"># File 'lib/box/item.rb', line 22</span>
|
678
|
+
|
679
|
+
<span class='kw'>def</span> <span class='id initialize'>initialize</span><span class='lparen'>(</span><span class='id api'>api</span><span class='comma'>,</span> <span class='id parent'>parent</span><span class='comma'>,</span> <span class='id info'>info</span><span class='rparen'>)</span>
|
680
|
+
<span class='ivar'>@api</span> <span class='op'>=</span> <span class='id api'>api</span>
|
681
|
+
<span class='ivar'>@parent</span> <span class='op'>=</span> <span class='id parent'>parent</span>
|
682
|
+
<span class='ivar'>@data</span> <span class='op'>=</span> <span class='const'>Hash</span><span class='period'>.</span><span class='id new'>new</span>
|
683
|
+
|
684
|
+
<span class='id update_info'>update_info</span><span class='lparen'>(</span><span class='id info'>info</span><span class='rparen'>)</span> <span class='comment'># merges with the info hash, and renames some fields
|
685
|
+
</span><span class='kw'>end</span></pre>
|
686
|
+
</td>
|
687
|
+
</tr>
|
688
|
+
</table>
|
689
|
+
</div>
|
690
|
+
|
691
|
+
</div>
|
692
|
+
<div id="method_missing_details" class="method_details_list">
|
693
|
+
<h2>Dynamic Method Handling</h2>
|
694
|
+
<p class="notice this">
|
695
|
+
This class handles dynamic methods through the <tt>method_missing</tt> method
|
696
|
+
|
697
|
+
</p>
|
698
|
+
|
699
|
+
<div class="method_details first">
|
700
|
+
<p class="signature first" id="method_missing-instance_method">
|
701
|
+
|
702
|
+
- (<tt>Object</tt>) <strong>method_missing</strong>(sym, *args, &block)
|
703
|
+
|
704
|
+
|
705
|
+
|
706
|
+
</p><div class="docstring">
|
707
|
+
<div class="discussion">
|
708
|
+
<p>
|
709
|
+
Provides an easy way to access this item’s info.
|
710
|
+
</p>
|
711
|
+
|
712
|
+
|
713
|
+
</div>
|
714
|
+
</div>
|
715
|
+
<div class="tags">
|
716
|
+
|
717
|
+
<div class="examples">
|
718
|
+
<h3>Examples:</h3>
|
719
|
+
|
720
|
+
<h4><div class='inline'></div></h4>
|
721
|
+
<pre class="example code"><span class='id item'>item</span><span class='period'>.</span><span class='id name'>name</span> <span class='comment'># returns @data['name'] or fetches it if not cached</span></pre>
|
722
|
+
|
723
|
+
</div>
|
724
|
+
|
725
|
+
</div><table class="source_code">
|
726
|
+
<tr>
|
727
|
+
<td>
|
728
|
+
<pre class="lines">
|
729
|
+
|
730
|
+
|
731
|
+
137
|
732
|
+
138
|
733
|
+
139
|
734
|
+
140
|
735
|
+
141
|
736
|
+
142
|
737
|
+
143
|
738
|
+
144
|
739
|
+
145
|
740
|
+
146
|
741
|
+
147
|
742
|
+
148
|
743
|
+
149
|
744
|
+
150
|
745
|
+
151
|
746
|
+
152
|
747
|
+
153
|
748
|
+
154</pre>
|
749
|
+
</td>
|
750
|
+
<td>
|
751
|
+
<pre class="code"><span class="info file"># File 'lib/box/item.rb', line 137</span>
|
752
|
+
|
753
|
+
<span class='kw'>def</span> <span class='id method_missing'>method_missing</span><span class='lparen'>(</span><span class='id sym'>sym</span><span class='comma'>,</span> <span class='op'>*</span><span class='id args'>args</span><span class='comma'>,</span> <span class='op'>&</span><span class='id block'>block</span><span class='rparen'>)</span>
|
754
|
+
<span class='comment'># TODO: Why not symbols?
|
755
|
+
</span> <span class='comment'># convert to a string
|
756
|
+
</span> <span class='id str'>str</span> <span class='op'>=</span> <span class='id sym'>sym</span><span class='period'>.</span><span class='id to_s'>to_s</span>
|
757
|
+
|
758
|
+
<span class='comment'># return the value if it already exists
|
759
|
+
</span> <span class='kw'>return</span> <span class='ivar'>@data</span><span class='lbracket'>[</span><span class='id str'>str</span><span class='rbracket'>]</span> <span class='kw'>if</span> <span class='ivar'>@data</span><span class='period'>.</span><span class='id key?'>key?</span><span class='lparen'>(</span><span class='id str'>str</span><span class='rparen'>)</span>
|
760
|
+
|
761
|
+
<span class='comment'># value didn't exist, so try to update the info
|
762
|
+
</span> <span class='kw'>self</span><span class='period'>.</span><span class='id info'>info</span>
|
763
|
+
|
764
|
+
<span class='comment'># try returning the value again
|
765
|
+
</span> <span class='kw'>return</span> <span class='ivar'>@data</span><span class='lbracket'>[</span><span class='id str'>str</span><span class='rbracket'>]</span> <span class='kw'>if</span> <span class='ivar'>@data</span><span class='period'>.</span><span class='id key?'>key?</span><span class='lparen'>(</span><span class='id str'>str</span><span class='rparen'>)</span>
|
766
|
+
|
767
|
+
<span class='comment'># we didn't find a value, so it must be invalid
|
768
|
+
</span> <span class='comment'># call the normal method_missing function
|
769
|
+
</span> <span class='kw'>super</span>
|
770
|
+
<span class='kw'>end</span></pre>
|
771
|
+
</td>
|
772
|
+
</tr>
|
773
|
+
</table>
|
774
|
+
</div>
|
775
|
+
|
776
|
+
</div>
|
777
|
+
|
778
|
+
<div id="instance_attr_details" class="attr_details">
|
779
|
+
<h2>Instance Attribute Details</h2>
|
780
|
+
|
781
|
+
|
782
|
+
<span id="api=-instance_method"></span>
|
783
|
+
<span id="api-instance_method"></span>
|
784
|
+
<div class="method_details first">
|
785
|
+
<p class="signature first" id="api-instance_method">
|
786
|
+
|
787
|
+
- (<tt><span class='object_link'><a href="Api.html" title="Box::Api (class)">Api</a></span></tt>) <strong>api</strong>
|
788
|
+
|
789
|
+
|
790
|
+
|
791
|
+
</p><div class="docstring">
|
792
|
+
<div class="discussion">
|
793
|
+
<p>
|
794
|
+
The <span class='object_link'><a href="Api.html" title="Box::Api (class)">Api</a></span> used by this item.
|
795
|
+
</p>
|
796
|
+
|
797
|
+
|
798
|
+
</div>
|
799
|
+
</div>
|
800
|
+
<div class="tags">
|
801
|
+
<h3>Returns:</h3>
|
802
|
+
<ul class="return">
|
803
|
+
|
804
|
+
<li>
|
805
|
+
|
806
|
+
|
807
|
+
<span class='type'>(<tt><span class='object_link'><a href="Api.html" title="Box::Api (class)">Api</a></span></tt>)</span>
|
808
|
+
|
809
|
+
|
810
|
+
|
811
|
+
—
|
812
|
+
<div class='inline'><p>
|
813
|
+
The <span class='object_link'><a href="Api.html" title="Box::Api (class)">Api</a></span> used by this item.
|
814
|
+
</p>
|
815
|
+
</div>
|
816
|
+
|
817
|
+
</li>
|
818
|
+
|
819
|
+
</ul>
|
820
|
+
|
821
|
+
</div><table class="source_code">
|
822
|
+
<tr>
|
823
|
+
<td>
|
824
|
+
<pre class="lines">
|
825
|
+
|
826
|
+
|
827
|
+
12
|
828
|
+
13
|
829
|
+
14</pre>
|
830
|
+
</td>
|
831
|
+
<td>
|
832
|
+
<pre class="code"><span class="info file"># File 'lib/box/item.rb', line 12</span>
|
833
|
+
|
834
|
+
<span class='kw'>def</span> <span class='id api'>api</span>
|
835
|
+
<span class='ivar'>@api</span>
|
836
|
+
<span class='kw'>end</span></pre>
|
837
|
+
</td>
|
838
|
+
</tr>
|
839
|
+
</table>
|
840
|
+
</div>
|
841
|
+
|
842
|
+
|
843
|
+
<span id="data=-instance_method"></span>
|
844
|
+
<span id="data-instance_method"></span>
|
845
|
+
<div class="method_details ">
|
846
|
+
<p class="signature " id="data-instance_method">
|
847
|
+
|
848
|
+
- (<tt>Hash</tt>) <strong>data</strong>
|
849
|
+
|
850
|
+
|
851
|
+
|
852
|
+
</p><div class="docstring">
|
853
|
+
<div class="discussion">
|
854
|
+
<p>
|
855
|
+
The hash of info for this item.
|
856
|
+
</p>
|
857
|
+
|
858
|
+
|
859
|
+
</div>
|
860
|
+
</div>
|
861
|
+
<div class="tags">
|
862
|
+
<h3>Returns:</h3>
|
863
|
+
<ul class="return">
|
864
|
+
|
865
|
+
<li>
|
866
|
+
|
867
|
+
|
868
|
+
<span class='type'>(<tt>Hash</tt>)</span>
|
869
|
+
|
870
|
+
|
871
|
+
|
872
|
+
—
|
873
|
+
<div class='inline'><p>
|
874
|
+
The hash of info for this item.
|
875
|
+
</p>
|
876
|
+
</div>
|
877
|
+
|
878
|
+
</li>
|
879
|
+
|
880
|
+
</ul>
|
881
|
+
|
882
|
+
</div><table class="source_code">
|
883
|
+
<tr>
|
884
|
+
<td>
|
885
|
+
<pre class="lines">
|
886
|
+
|
887
|
+
|
888
|
+
9
|
889
|
+
10
|
890
|
+
11</pre>
|
891
|
+
</td>
|
892
|
+
<td>
|
893
|
+
<pre class="code"><span class="info file"># File 'lib/box/item.rb', line 9</span>
|
894
|
+
|
895
|
+
<span class='kw'>def</span> <span class='id data'>data</span>
|
896
|
+
<span class='ivar'>@data</span>
|
897
|
+
<span class='kw'>end</span></pre>
|
898
|
+
</td>
|
899
|
+
</tr>
|
900
|
+
</table>
|
901
|
+
</div>
|
902
|
+
|
903
|
+
|
904
|
+
<span id="parent=-instance_method"></span>
|
905
|
+
<span id="parent-instance_method"></span>
|
906
|
+
<div class="method_details ">
|
907
|
+
<p class="signature " id="parent-instance_method">
|
908
|
+
|
909
|
+
- (<tt><span class='object_link'><a href="Folder.html" title="Box::Folder (class)">Folder</a></span></tt>) <strong>parent</strong>
|
910
|
+
|
911
|
+
|
912
|
+
|
913
|
+
</p><div class="docstring">
|
914
|
+
<div class="discussion">
|
915
|
+
<p>
|
916
|
+
The parent of this item.
|
917
|
+
</p>
|
918
|
+
|
919
|
+
|
920
|
+
</div>
|
921
|
+
</div>
|
922
|
+
<div class="tags">
|
923
|
+
<h3>Returns:</h3>
|
924
|
+
<ul class="return">
|
925
|
+
|
926
|
+
<li>
|
927
|
+
|
928
|
+
|
929
|
+
<span class='type'>(<tt><span class='object_link'><a href="Folder.html" title="Box::Folder (class)">Folder</a></span></tt>)</span>
|
930
|
+
|
931
|
+
|
932
|
+
|
933
|
+
—
|
934
|
+
<div class='inline'><p>
|
935
|
+
The parent of this item.
|
936
|
+
</p>
|
937
|
+
</div>
|
938
|
+
|
939
|
+
</li>
|
940
|
+
|
941
|
+
</ul>
|
942
|
+
|
943
|
+
</div><table class="source_code">
|
944
|
+
<tr>
|
945
|
+
<td>
|
946
|
+
<pre class="lines">
|
947
|
+
|
948
|
+
|
949
|
+
15
|
950
|
+
16
|
951
|
+
17</pre>
|
952
|
+
</td>
|
953
|
+
<td>
|
954
|
+
<pre class="code"><span class="info file"># File 'lib/box/item.rb', line 15</span>
|
955
|
+
|
956
|
+
<span class='kw'>def</span> <span class='id parent'>parent</span>
|
957
|
+
<span class='ivar'>@parent</span>
|
958
|
+
<span class='kw'>end</span></pre>
|
959
|
+
</td>
|
960
|
+
</tr>
|
961
|
+
</table>
|
962
|
+
</div>
|
963
|
+
|
964
|
+
</div>
|
965
|
+
|
966
|
+
|
967
|
+
<div id="class_method_details" class="method_details_list">
|
968
|
+
<h2>Class Method Details</h2>
|
969
|
+
|
970
|
+
|
971
|
+
<div class="method_details first">
|
972
|
+
<p class="signature first" id="type-class_method">
|
973
|
+
|
974
|
+
+ (<tt>String</tt>) <strong>type</strong>
|
975
|
+
|
976
|
+
|
977
|
+
|
978
|
+
</p><div class="docstring">
|
979
|
+
<div class="discussion">
|
980
|
+
<p>
|
981
|
+
The string representation of this item.
|
982
|
+
</p>
|
983
|
+
|
984
|
+
|
985
|
+
</div>
|
986
|
+
</div>
|
987
|
+
<div class="tags">
|
988
|
+
<h3>Returns:</h3>
|
989
|
+
<ul class="return">
|
990
|
+
|
991
|
+
<li>
|
992
|
+
|
993
|
+
|
994
|
+
<span class='type'>(<tt>String</tt>)</span>
|
995
|
+
|
996
|
+
|
997
|
+
|
998
|
+
—
|
999
|
+
<div class='inline'><p>
|
1000
|
+
The string representation of this item.
|
1001
|
+
</p>
|
1002
|
+
</div>
|
1003
|
+
|
1004
|
+
</li>
|
1005
|
+
|
1006
|
+
</ul>
|
1007
|
+
|
1008
|
+
</div><table class="source_code">
|
1009
|
+
<tr>
|
1010
|
+
<td>
|
1011
|
+
<pre class="lines">
|
1012
|
+
|
1013
|
+
|
1014
|
+
31</pre>
|
1015
|
+
</td>
|
1016
|
+
<td>
|
1017
|
+
<pre class="code"><span class="info file"># File 'lib/box/item.rb', line 31</span>
|
1018
|
+
|
1019
|
+
<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id type'>type</span><span class='semicolon'>;</span> <span class='id raise'>raise</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Overwrite this method</span><span class='tstring_end'>"</span></span><span class='semicolon'>;</span> <span class='kw'>end</span></pre>
|
1020
|
+
</td>
|
1021
|
+
</tr>
|
1022
|
+
</table>
|
1023
|
+
</div>
|
1024
|
+
|
1025
|
+
<div class="method_details ">
|
1026
|
+
<p class="signature " id="types-class_method">
|
1027
|
+
|
1028
|
+
+ (<tt>String</tt>) <strong>types</strong>
|
1029
|
+
|
1030
|
+
|
1031
|
+
|
1032
|
+
</p><div class="docstring">
|
1033
|
+
<div class="discussion">
|
1034
|
+
<p>
|
1035
|
+
The plural string representation of this item.
|
1036
|
+
</p>
|
1037
|
+
|
1038
|
+
|
1039
|
+
</div>
|
1040
|
+
</div>
|
1041
|
+
<div class="tags">
|
1042
|
+
<h3>Returns:</h3>
|
1043
|
+
<ul class="return">
|
1044
|
+
|
1045
|
+
<li>
|
1046
|
+
|
1047
|
+
|
1048
|
+
<span class='type'>(<tt>String</tt>)</span>
|
1049
|
+
|
1050
|
+
|
1051
|
+
|
1052
|
+
—
|
1053
|
+
<div class='inline'><p>
|
1054
|
+
The plural string representation of this item.
|
1055
|
+
</p>
|
1056
|
+
</div>
|
1057
|
+
|
1058
|
+
</li>
|
1059
|
+
|
1060
|
+
</ul>
|
1061
|
+
|
1062
|
+
</div><table class="source_code">
|
1063
|
+
<tr>
|
1064
|
+
<td>
|
1065
|
+
<pre class="lines">
|
1066
|
+
|
1067
|
+
|
1068
|
+
34</pre>
|
1069
|
+
</td>
|
1070
|
+
<td>
|
1071
|
+
<pre class="code"><span class="info file"># File 'lib/box/item.rb', line 34</span>
|
1072
|
+
|
1073
|
+
<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id types'>types</span><span class='semicolon'>;</span> <span class='id type'>type</span> <span class='op'>+</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>s</span><span class='tstring_end'>'</span></span><span class='semicolon'>;</span> <span class='kw'>end</span></pre>
|
1074
|
+
</td>
|
1075
|
+
</tr>
|
1076
|
+
</table>
|
1077
|
+
</div>
|
1078
|
+
|
1079
|
+
</div>
|
1080
|
+
|
1081
|
+
<div id="instance_method_details" class="method_details_list">
|
1082
|
+
<h2>Instance Method Details</h2>
|
1083
|
+
|
1084
|
+
|
1085
|
+
<div class="method_details first">
|
1086
|
+
<p class="signature first" id="copy-instance_method">
|
1087
|
+
|
1088
|
+
- (<tt><span class='object_link'><a href="" title="Box::Item (class)">Item</a></span></tt>) <strong>copy</strong>(destination)
|
1089
|
+
|
1090
|
+
|
1091
|
+
|
1092
|
+
</p><div class="docstring">
|
1093
|
+
<div class="discussion">
|
1094
|
+
|
1095
|
+
<div class="note notetag">
|
1096
|
+
<strong>Note:</strong>
|
1097
|
+
<div class='inline'><p>
|
1098
|
+
Copying folders is not currently supported.
|
1099
|
+
</p>
|
1100
|
+
</div>
|
1101
|
+
</div>
|
1102
|
+
|
1103
|
+
<p>
|
1104
|
+
Copy this item to the destination folder.
|
1105
|
+
</p>
|
1106
|
+
|
1107
|
+
|
1108
|
+
</div>
|
1109
|
+
</div>
|
1110
|
+
<div class="tags">
|
1111
|
+
<h3>Parameters:</h3>
|
1112
|
+
<ul class="param">
|
1113
|
+
|
1114
|
+
<li>
|
1115
|
+
|
1116
|
+
<span class='name'>destination</span>
|
1117
|
+
|
1118
|
+
|
1119
|
+
<span class='type'>(<tt><span class='object_link'><a href="Folder.html" title="Box::Folder (class)">Folder</a></span></tt>)</span>
|
1120
|
+
|
1121
|
+
|
1122
|
+
|
1123
|
+
—
|
1124
|
+
<div class='inline'><p>
|
1125
|
+
The parent folder to copy the item to.
|
1126
|
+
</p>
|
1127
|
+
</div>
|
1128
|
+
|
1129
|
+
</li>
|
1130
|
+
|
1131
|
+
</ul>
|
1132
|
+
<h3>Returns:</h3>
|
1133
|
+
<ul class="return">
|
1134
|
+
|
1135
|
+
<li>
|
1136
|
+
|
1137
|
+
|
1138
|
+
<span class='type'>(<tt><span class='object_link'><a href="" title="Box::Item (class)">Item</a></span></tt>)</span>
|
1139
|
+
|
1140
|
+
|
1141
|
+
|
1142
|
+
—
|
1143
|
+
<div class='inline'><p>
|
1144
|
+
The new copy of this item.
|
1145
|
+
</p>
|
1146
|
+
</div>
|
1147
|
+
|
1148
|
+
</li>
|
1149
|
+
|
1150
|
+
</ul>
|
1151
|
+
|
1152
|
+
</div><table class="source_code">
|
1153
|
+
<tr>
|
1154
|
+
<td>
|
1155
|
+
<pre class="lines">
|
1156
|
+
|
1157
|
+
|
1158
|
+
85
|
1159
|
+
86
|
1160
|
+
87
|
1161
|
+
88
|
1162
|
+
89
|
1163
|
+
90
|
1164
|
+
91</pre>
|
1165
|
+
</td>
|
1166
|
+
<td>
|
1167
|
+
<pre class="code"><span class="info file"># File 'lib/box/item.rb', line 85</span>
|
1168
|
+
|
1169
|
+
<span class='kw'>def</span> <span class='id copy'>copy</span><span class='lparen'>(</span><span class='id destination'>destination</span><span class='rparen'>)</span>
|
1170
|
+
<span class='ivar'>@api</span><span class='period'>.</span><span class='id copy'>copy</span><span class='lparen'>(</span><span class='id type'>type</span><span class='comma'>,</span> <span class='id id'>id</span><span class='comma'>,</span> <span class='id destination'>destination</span><span class='period'>.</span><span class='id id'>id</span><span class='rparen'>)</span>
|
1171
|
+
|
1172
|
+
<span class='id destination'>destination</span><span class='period'>.</span><span class='id delete_info'>delete_info</span><span class='lparen'>(</span><span class='kw'>self</span><span class='period'>.</span><span class='id types'>types</span><span class='rparen'>)</span>
|
1173
|
+
|
1174
|
+
<span class='kw'>self</span><span class='period'>.</span><span class='id class'>class</span><span class='period'>.</span><span class='id new'>new</span><span class='lparen'>(</span><span class='id api'>api</span><span class='comma'>,</span> <span class='id destination'>destination</span><span class='comma'>,</span> <span class='ivar'>@data</span><span class='rparen'>)</span>
|
1175
|
+
<span class='kw'>end</span></pre>
|
1176
|
+
</td>
|
1177
|
+
</tr>
|
1178
|
+
</table>
|
1179
|
+
</div>
|
1180
|
+
|
1181
|
+
<div class="method_details ">
|
1182
|
+
<p class="signature " id="delete-instance_method">
|
1183
|
+
|
1184
|
+
- (<tt><span class='object_link'><a href="" title="Box::Item (class)">Item</a></span></tt>) <strong>delete</strong>
|
1185
|
+
|
1186
|
+
|
1187
|
+
|
1188
|
+
</p><div class="docstring">
|
1189
|
+
<div class="discussion">
|
1190
|
+
<p>
|
1191
|
+
Delete this item and all sub-items.
|
1192
|
+
</p>
|
1193
|
+
<p>
|
1194
|
+
TODO: Return nil instead
|
1195
|
+
</p>
|
1196
|
+
|
1197
|
+
|
1198
|
+
</div>
|
1199
|
+
</div>
|
1200
|
+
<div class="tags">
|
1201
|
+
<h3>Returns:</h3>
|
1202
|
+
<ul class="return">
|
1203
|
+
|
1204
|
+
<li>
|
1205
|
+
|
1206
|
+
|
1207
|
+
<span class='type'>(<tt><span class='object_link'><a href="" title="Box::Item (class)">Item</a></span></tt>)</span>
|
1208
|
+
|
1209
|
+
|
1210
|
+
|
1211
|
+
—
|
1212
|
+
<div class='inline'><p>
|
1213
|
+
self
|
1214
|
+
</p>
|
1215
|
+
</div>
|
1216
|
+
|
1217
|
+
</li>
|
1218
|
+
|
1219
|
+
</ul>
|
1220
|
+
|
1221
|
+
</div><table class="source_code">
|
1222
|
+
<tr>
|
1223
|
+
<td>
|
1224
|
+
<pre class="lines">
|
1225
|
+
|
1226
|
+
|
1227
|
+
109
|
1228
|
+
110
|
1229
|
+
111
|
1230
|
+
112
|
1231
|
+
113
|
1232
|
+
114
|
1233
|
+
115
|
1234
|
+
116</pre>
|
1235
|
+
</td>
|
1236
|
+
<td>
|
1237
|
+
<pre class="code"><span class="info file"># File 'lib/box/item.rb', line 109</span>
|
1238
|
+
|
1239
|
+
<span class='kw'>def</span> <span class='id delete'>delete</span>
|
1240
|
+
<span class='ivar'>@api</span><span class='period'>.</span><span class='id delete'>delete</span><span class='lparen'>(</span><span class='id type'>type</span><span class='comma'>,</span> <span class='id id'>id</span><span class='rparen'>)</span>
|
1241
|
+
|
1242
|
+
<span class='id parent'>parent</span><span class='period'>.</span><span class='id delete_info'>delete_info</span><span class='lparen'>(</span><span class='kw'>self</span><span class='period'>.</span><span class='id types'>types</span><span class='rparen'>)</span>
|
1243
|
+
<span class='ivar'>@parent</span> <span class='op'>=</span> <span class='kw'>nil</span>
|
1244
|
+
|
1245
|
+
<span class='kw'>self</span>
|
1246
|
+
<span class='kw'>end</span></pre>
|
1247
|
+
</td>
|
1248
|
+
</tr>
|
1249
|
+
</table>
|
1250
|
+
</div>
|
1251
|
+
|
1252
|
+
<div class="method_details ">
|
1253
|
+
<p class="signature " id="description-instance_method">
|
1254
|
+
|
1255
|
+
- (<tt><span class='object_link'><a href="" title="Box::Item (class)">Item</a></span></tt>) <strong>description</strong>(message)
|
1256
|
+
|
1257
|
+
|
1258
|
+
|
1259
|
+
</p><div class="docstring">
|
1260
|
+
<div class="discussion">
|
1261
|
+
<p>
|
1262
|
+
Set the description of this item.
|
1263
|
+
</p>
|
1264
|
+
|
1265
|
+
|
1266
|
+
</div>
|
1267
|
+
</div>
|
1268
|
+
<div class="tags">
|
1269
|
+
<h3>Parameters:</h3>
|
1270
|
+
<ul class="param">
|
1271
|
+
|
1272
|
+
<li>
|
1273
|
+
|
1274
|
+
<span class='name'>message</span>
|
1275
|
+
|
1276
|
+
|
1277
|
+
<span class='type'>(<tt>String</tt>)</span>
|
1278
|
+
|
1279
|
+
|
1280
|
+
|
1281
|
+
—
|
1282
|
+
<div class='inline'><p>
|
1283
|
+
The description message to use.
|
1284
|
+
</p>
|
1285
|
+
</div>
|
1286
|
+
|
1287
|
+
</li>
|
1288
|
+
|
1289
|
+
</ul>
|
1290
|
+
<h3>Returns:</h3>
|
1291
|
+
<ul class="return">
|
1292
|
+
|
1293
|
+
<li>
|
1294
|
+
|
1295
|
+
|
1296
|
+
<span class='type'>(<tt><span class='object_link'><a href="" title="Box::Item (class)">Item</a></span></tt>)</span>
|
1297
|
+
|
1298
|
+
|
1299
|
+
|
1300
|
+
—
|
1301
|
+
<div class='inline'><p>
|
1302
|
+
self
|
1303
|
+
</p>
|
1304
|
+
</div>
|
1305
|
+
|
1306
|
+
</li>
|
1307
|
+
|
1308
|
+
</ul>
|
1309
|
+
|
1310
|
+
</div><table class="source_code">
|
1311
|
+
<tr>
|
1312
|
+
<td>
|
1313
|
+
<pre class="lines">
|
1314
|
+
|
1315
|
+
|
1316
|
+
122
|
1317
|
+
123
|
1318
|
+
124
|
1319
|
+
125
|
1320
|
+
126</pre>
|
1321
|
+
</td>
|
1322
|
+
<td>
|
1323
|
+
<pre class="code"><span class="info file"># File 'lib/box/item.rb', line 122</span>
|
1324
|
+
|
1325
|
+
<span class='kw'>def</span> <span class='id description'>description</span><span class='lparen'>(</span><span class='id message'>message</span><span class='rparen'>)</span>
|
1326
|
+
<span class='ivar'>@api</span><span class='period'>.</span><span class='id set_description'>set_description</span><span class='lparen'>(</span><span class='id type'>type</span><span class='comma'>,</span> <span class='id id'>id</span><span class='comma'>,</span> <span class='id message'>message</span><span class='rparen'>)</span>
|
1327
|
+
|
1328
|
+
<span class='kw'>self</span>
|
1329
|
+
<span class='kw'>end</span></pre>
|
1330
|
+
</td>
|
1331
|
+
</tr>
|
1332
|
+
</table>
|
1333
|
+
</div>
|
1334
|
+
|
1335
|
+
<div class="method_details ">
|
1336
|
+
<p class="signature " id="force_cached_info-instance_method">
|
1337
|
+
|
1338
|
+
- (<tt>Object</tt>) <strong>force_cached_info</strong>
|
1339
|
+
|
1340
|
+
|
1341
|
+
|
1342
|
+
</p><div class="docstring">
|
1343
|
+
<div class="discussion">
|
1344
|
+
<p>
|
1345
|
+
Consider the item cached. This prevents an additional api when we know the
|
1346
|
+
item is fully fetched.
|
1347
|
+
</p>
|
1348
|
+
|
1349
|
+
|
1350
|
+
</div>
|
1351
|
+
</div>
|
1352
|
+
<div class="tags">
|
1353
|
+
|
1354
|
+
</div><table class="source_code">
|
1355
|
+
<tr>
|
1356
|
+
<td>
|
1357
|
+
<pre class="lines">
|
1358
|
+
|
1359
|
+
|
1360
|
+
158
|
1361
|
+
159
|
1362
|
+
160</pre>
|
1363
|
+
</td>
|
1364
|
+
<td>
|
1365
|
+
<pre class="code"><span class="info file"># File 'lib/box/item.rb', line 158</span>
|
1366
|
+
|
1367
|
+
<span class='kw'>def</span> <span class='id force_cached_info'>force_cached_info</span>
|
1368
|
+
<span class='ivar'>@cached_info</span> <span class='op'>=</span> <span class='kw'>true</span>
|
1369
|
+
<span class='kw'>end</span></pre>
|
1370
|
+
</td>
|
1371
|
+
</tr>
|
1372
|
+
</table>
|
1373
|
+
</div>
|
1374
|
+
|
1375
|
+
<div class="method_details ">
|
1376
|
+
<p class="signature " id="id-instance_method">
|
1377
|
+
|
1378
|
+
- (<tt>String</tt>) <strong>id</strong>
|
1379
|
+
|
1380
|
+
|
1381
|
+
|
1382
|
+
</p><div class="docstring">
|
1383
|
+
<div class="discussion">
|
1384
|
+
<p>
|
1385
|
+
The id of this item.
|
1386
|
+
</p>
|
1387
|
+
|
1388
|
+
|
1389
|
+
</div>
|
1390
|
+
</div>
|
1391
|
+
<div class="tags">
|
1392
|
+
<h3>Returns:</h3>
|
1393
|
+
<ul class="return">
|
1394
|
+
|
1395
|
+
<li>
|
1396
|
+
|
1397
|
+
|
1398
|
+
<span class='type'>(<tt>String</tt>)</span>
|
1399
|
+
|
1400
|
+
|
1401
|
+
|
1402
|
+
—
|
1403
|
+
<div class='inline'><p>
|
1404
|
+
The id of this item.
|
1405
|
+
</p>
|
1406
|
+
</div>
|
1407
|
+
|
1408
|
+
</li>
|
1409
|
+
|
1410
|
+
</ul>
|
1411
|
+
|
1412
|
+
</div><table class="source_code">
|
1413
|
+
<tr>
|
1414
|
+
<td>
|
1415
|
+
<pre class="lines">
|
1416
|
+
|
1417
|
+
|
1418
|
+
45
|
1419
|
+
46
|
1420
|
+
47
|
1421
|
+
48</pre>
|
1422
|
+
</td>
|
1423
|
+
<td>
|
1424
|
+
<pre class="code"><span class="info file"># File 'lib/box/item.rb', line 45</span>
|
1425
|
+
|
1426
|
+
<span class='kw'>def</span> <span class='id id'>id</span>
|
1427
|
+
<span class='comment'># overloads Object#id
|
1428
|
+
</span> <span class='ivar'>@data</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>id</span><span class='tstring_end'>'</span></span><span class='rbracket'>]</span>
|
1429
|
+
<span class='kw'>end</span></pre>
|
1430
|
+
</td>
|
1431
|
+
</tr>
|
1432
|
+
</table>
|
1433
|
+
</div>
|
1434
|
+
|
1435
|
+
<div class="method_details ">
|
1436
|
+
<p class="signature " id="info-instance_method">
|
1437
|
+
|
1438
|
+
- (<tt><span class='object_link'><a href="" title="Box::Item (class)">Item</a></span></tt>) <strong>info</strong>(refresh = false)
|
1439
|
+
|
1440
|
+
|
1441
|
+
|
1442
|
+
</p><div class="docstring">
|
1443
|
+
<div class="discussion">
|
1444
|
+
<p>
|
1445
|
+
Get the info for this item. Uses a cached copy if avaliable, or else it is
|
1446
|
+
fetched from the api.
|
1447
|
+
</p>
|
1448
|
+
|
1449
|
+
|
1450
|
+
</div>
|
1451
|
+
</div>
|
1452
|
+
<div class="tags">
|
1453
|
+
<h3>Parameters:</h3>
|
1454
|
+
<ul class="param">
|
1455
|
+
|
1456
|
+
<li>
|
1457
|
+
|
1458
|
+
<span class='name'>refresh</span>
|
1459
|
+
|
1460
|
+
|
1461
|
+
<span class='type'>(<tt>Boolean</tt>)</span>
|
1462
|
+
|
1463
|
+
|
1464
|
+
<em class="default">(defaults to: <tt>false</tt>)</em>
|
1465
|
+
|
1466
|
+
|
1467
|
+
—
|
1468
|
+
<div class='inline'><p>
|
1469
|
+
Does not use the cached copy if true.
|
1470
|
+
</p>
|
1471
|
+
</div>
|
1472
|
+
|
1473
|
+
</li>
|
1474
|
+
|
1475
|
+
</ul>
|
1476
|
+
<h3>Returns:</h3>
|
1477
|
+
<ul class="return">
|
1478
|
+
|
1479
|
+
<li>
|
1480
|
+
|
1481
|
+
|
1482
|
+
<span class='type'>(<tt><span class='object_link'><a href="" title="Box::Item (class)">Item</a></span></tt>)</span>
|
1483
|
+
|
1484
|
+
|
1485
|
+
|
1486
|
+
—
|
1487
|
+
<div class='inline'><p>
|
1488
|
+
self
|
1489
|
+
</p>
|
1490
|
+
</div>
|
1491
|
+
|
1492
|
+
</li>
|
1493
|
+
|
1494
|
+
</ul>
|
1495
|
+
|
1496
|
+
</div><table class="source_code">
|
1497
|
+
<tr>
|
1498
|
+
<td>
|
1499
|
+
<pre class="lines">
|
1500
|
+
|
1501
|
+
|
1502
|
+
55
|
1503
|
+
56
|
1504
|
+
57
|
1505
|
+
58
|
1506
|
+
59
|
1507
|
+
60
|
1508
|
+
61
|
1509
|
+
62</pre>
|
1510
|
+
</td>
|
1511
|
+
<td>
|
1512
|
+
<pre class="code"><span class="info file"># File 'lib/box/item.rb', line 55</span>
|
1513
|
+
|
1514
|
+
<span class='kw'>def</span> <span class='id info'>info</span><span class='lparen'>(</span><span class='id refresh'>refresh</span> <span class='op'>=</span> <span class='kw'>false</span><span class='rparen'>)</span>
|
1515
|
+
<span class='kw'>return</span> <span class='kw'>self</span> <span class='kw'>if</span> <span class='ivar'>@cached_info</span> <span class='kw'>and</span> <span class='kw'>not</span> <span class='id refresh'>refresh</span>
|
1516
|
+
|
1517
|
+
<span class='ivar'>@cached_info</span> <span class='op'>=</span> <span class='kw'>true</span>
|
1518
|
+
<span class='id update_info'>update_info</span><span class='lparen'>(</span><span class='id get_info'>get_info</span><span class='rparen'>)</span>
|
1519
|
+
|
1520
|
+
<span class='kw'>self</span>
|
1521
|
+
<span class='kw'>end</span></pre>
|
1522
|
+
</td>
|
1523
|
+
</tr>
|
1524
|
+
</table>
|
1525
|
+
</div>
|
1526
|
+
|
1527
|
+
<div class="method_details ">
|
1528
|
+
<p class="signature " id="move-instance_method">
|
1529
|
+
|
1530
|
+
- (<tt><span class='object_link'><a href="" title="Box::Item (class)">Item</a></span></tt>) <strong>move</strong>(destination)
|
1531
|
+
|
1532
|
+
|
1533
|
+
|
1534
|
+
</p><div class="docstring">
|
1535
|
+
<div class="discussion">
|
1536
|
+
<p>
|
1537
|
+
Move this item to the destination folder.
|
1538
|
+
</p>
|
1539
|
+
|
1540
|
+
|
1541
|
+
</div>
|
1542
|
+
</div>
|
1543
|
+
<div class="tags">
|
1544
|
+
<h3>Parameters:</h3>
|
1545
|
+
<ul class="param">
|
1546
|
+
|
1547
|
+
<li>
|
1548
|
+
|
1549
|
+
<span class='name'>destination</span>
|
1550
|
+
|
1551
|
+
|
1552
|
+
<span class='type'>(<tt><span class='object_link'><a href="Folder.html" title="Box::Folder (class)">Folder</a></span></tt>)</span>
|
1553
|
+
|
1554
|
+
|
1555
|
+
|
1556
|
+
—
|
1557
|
+
<div class='inline'><p>
|
1558
|
+
The new parent folder to use.
|
1559
|
+
</p>
|
1560
|
+
</div>
|
1561
|
+
|
1562
|
+
</li>
|
1563
|
+
|
1564
|
+
</ul>
|
1565
|
+
<h3>Returns:</h3>
|
1566
|
+
<ul class="return">
|
1567
|
+
|
1568
|
+
<li>
|
1569
|
+
|
1570
|
+
|
1571
|
+
<span class='type'>(<tt><span class='object_link'><a href="" title="Box::Item (class)">Item</a></span></tt>)</span>
|
1572
|
+
|
1573
|
+
|
1574
|
+
|
1575
|
+
—
|
1576
|
+
<div class='inline'><p>
|
1577
|
+
self
|
1578
|
+
</p>
|
1579
|
+
</div>
|
1580
|
+
|
1581
|
+
</li>
|
1582
|
+
|
1583
|
+
</ul>
|
1584
|
+
|
1585
|
+
</div><table class="source_code">
|
1586
|
+
<tr>
|
1587
|
+
<td>
|
1588
|
+
<pre class="lines">
|
1589
|
+
|
1590
|
+
|
1591
|
+
68
|
1592
|
+
69
|
1593
|
+
70
|
1594
|
+
71
|
1595
|
+
72
|
1596
|
+
73
|
1597
|
+
74
|
1598
|
+
75
|
1599
|
+
76
|
1600
|
+
77</pre>
|
1601
|
+
</td>
|
1602
|
+
<td>
|
1603
|
+
<pre class="code"><span class="info file"># File 'lib/box/item.rb', line 68</span>
|
1604
|
+
|
1605
|
+
<span class='kw'>def</span> <span class='id move'>move</span><span class='lparen'>(</span><span class='id destination'>destination</span><span class='rparen'>)</span>
|
1606
|
+
<span class='ivar'>@api</span><span class='period'>.</span><span class='id move'>move</span><span class='lparen'>(</span><span class='id type'>type</span><span class='comma'>,</span> <span class='id id'>id</span><span class='comma'>,</span> <span class='id destination'>destination</span><span class='period'>.</span><span class='id id'>id</span><span class='rparen'>)</span>
|
1607
|
+
|
1608
|
+
<span class='id parent'>parent</span><span class='period'>.</span><span class='id delete_info'>delete_info</span><span class='lparen'>(</span><span class='kw'>self</span><span class='period'>.</span><span class='id types'>types</span><span class='rparen'>)</span>
|
1609
|
+
<span class='id destination'>destination</span><span class='period'>.</span><span class='id delete_info'>delete_info</span><span class='lparen'>(</span><span class='kw'>self</span><span class='period'>.</span><span class='id types'>types</span><span class='rparen'>)</span>
|
1610
|
+
|
1611
|
+
<span class='ivar'>@parent</span> <span class='op'>=</span> <span class='id destination'>destination</span>
|
1612
|
+
|
1613
|
+
<span class='kw'>self</span>
|
1614
|
+
<span class='kw'>end</span></pre>
|
1615
|
+
</td>
|
1616
|
+
</tr>
|
1617
|
+
</table>
|
1618
|
+
</div>
|
1619
|
+
|
1620
|
+
<div class="method_details ">
|
1621
|
+
<p class="signature " id="path-instance_method">
|
1622
|
+
|
1623
|
+
- (<tt>String</tt>) <strong>path</strong>
|
1624
|
+
|
1625
|
+
|
1626
|
+
|
1627
|
+
</p><div class="docstring">
|
1628
|
+
<div class="discussion">
|
1629
|
+
<p>
|
1630
|
+
The path of this item. This starts with a ’/’.
|
1631
|
+
</p>
|
1632
|
+
|
1633
|
+
|
1634
|
+
</div>
|
1635
|
+
</div>
|
1636
|
+
<div class="tags">
|
1637
|
+
<h3>Returns:</h3>
|
1638
|
+
<ul class="return">
|
1639
|
+
|
1640
|
+
<li>
|
1641
|
+
|
1642
|
+
|
1643
|
+
<span class='type'>(<tt>String</tt>)</span>
|
1644
|
+
|
1645
|
+
|
1646
|
+
|
1647
|
+
—
|
1648
|
+
<div class='inline'><p>
|
1649
|
+
The path of this item. This starts with a ’/’.
|
1650
|
+
</p>
|
1651
|
+
</div>
|
1652
|
+
|
1653
|
+
</li>
|
1654
|
+
|
1655
|
+
</ul>
|
1656
|
+
|
1657
|
+
</div><table class="source_code">
|
1658
|
+
<tr>
|
1659
|
+
<td>
|
1660
|
+
<pre class="lines">
|
1661
|
+
|
1662
|
+
|
1663
|
+
129
|
1664
|
+
130
|
1665
|
+
131</pre>
|
1666
|
+
</td>
|
1667
|
+
<td>
|
1668
|
+
<pre class="code"><span class="info file"># File 'lib/box/item.rb', line 129</span>
|
1669
|
+
|
1670
|
+
<span class='kw'>def</span> <span class='id path'>path</span>
|
1671
|
+
<span class='tstring'><span class='tstring_beg'>"</span><span class='embexpr_beg'>#{</span> <span class='id parent'>parent</span><span class='period'>.</span><span class='id path'>path</span> <span class='op'>+</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>/</span><span class='tstring_end'>'</span></span> <span class='kw'>if</span> <span class='id parent'>parent</span> <span class='rbrace'>}</span><span class='embexpr_beg'>#{</span> <span class='id name'>name</span> <span class='rbrace'>}</span><span class='tstring_end'>"</span></span>
|
1672
|
+
<span class='kw'>end</span></pre>
|
1673
|
+
</td>
|
1674
|
+
</tr>
|
1675
|
+
</table>
|
1676
|
+
</div>
|
1677
|
+
|
1678
|
+
<div class="method_details ">
|
1679
|
+
<p class="signature " id="rename-instance_method">
|
1680
|
+
|
1681
|
+
- (<tt><span class='object_link'><a href="" title="Box::Item (class)">Item</a></span></tt>) <strong>rename</strong>(new_name)
|
1682
|
+
|
1683
|
+
|
1684
|
+
|
1685
|
+
</p><div class="docstring">
|
1686
|
+
<div class="discussion">
|
1687
|
+
<p>
|
1688
|
+
Rename this item.
|
1689
|
+
</p>
|
1690
|
+
|
1691
|
+
|
1692
|
+
</div>
|
1693
|
+
</div>
|
1694
|
+
<div class="tags">
|
1695
|
+
<h3>Parameters:</h3>
|
1696
|
+
<ul class="param">
|
1697
|
+
|
1698
|
+
<li>
|
1699
|
+
|
1700
|
+
<span class='name'>new_name</span>
|
1701
|
+
|
1702
|
+
|
1703
|
+
<span class='type'>(<tt>String</tt>)</span>
|
1704
|
+
|
1705
|
+
|
1706
|
+
|
1707
|
+
—
|
1708
|
+
<div class='inline'><p>
|
1709
|
+
The new name for the item.
|
1710
|
+
</p>
|
1711
|
+
</div>
|
1712
|
+
|
1713
|
+
</li>
|
1714
|
+
|
1715
|
+
</ul>
|
1716
|
+
<h3>Returns:</h3>
|
1717
|
+
<ul class="return">
|
1718
|
+
|
1719
|
+
<li>
|
1720
|
+
|
1721
|
+
|
1722
|
+
<span class='type'>(<tt><span class='object_link'><a href="" title="Box::Item (class)">Item</a></span></tt>)</span>
|
1723
|
+
|
1724
|
+
|
1725
|
+
|
1726
|
+
—
|
1727
|
+
<div class='inline'><p>
|
1728
|
+
self
|
1729
|
+
</p>
|
1730
|
+
</div>
|
1731
|
+
|
1732
|
+
</li>
|
1733
|
+
|
1734
|
+
</ul>
|
1735
|
+
|
1736
|
+
</div><table class="source_code">
|
1737
|
+
<tr>
|
1738
|
+
<td>
|
1739
|
+
<pre class="lines">
|
1740
|
+
|
1741
|
+
|
1742
|
+
97
|
1743
|
+
98
|
1744
|
+
99
|
1745
|
+
100
|
1746
|
+
101
|
1747
|
+
102
|
1748
|
+
103</pre>
|
1749
|
+
</td>
|
1750
|
+
<td>
|
1751
|
+
<pre class="code"><span class="info file"># File 'lib/box/item.rb', line 97</span>
|
1752
|
+
|
1753
|
+
<span class='kw'>def</span> <span class='id rename'>rename</span><span class='lparen'>(</span><span class='id new_name'>new_name</span><span class='rparen'>)</span>
|
1754
|
+
<span class='ivar'>@api</span><span class='period'>.</span><span class='id rename'>rename</span><span class='lparen'>(</span><span class='id type'>type</span><span class='comma'>,</span> <span class='id id'>id</span><span class='comma'>,</span> <span class='id new_name'>new_name</span><span class='rparen'>)</span>
|
1755
|
+
|
1756
|
+
<span class='id update_info'>update_info</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>name</span><span class='tstring_end'>'</span></span> <span class='op'>=></span> <span class='id new_name'>new_name</span><span class='rparen'>)</span>
|
1757
|
+
|
1758
|
+
<span class='kw'>self</span>
|
1759
|
+
<span class='kw'>end</span></pre>
|
1760
|
+
</td>
|
1761
|
+
</tr>
|
1762
|
+
</table>
|
1763
|
+
</div>
|
1764
|
+
|
1765
|
+
<div class="method_details ">
|
1766
|
+
<p class="signature " id="type-instance_method">
|
1767
|
+
|
1768
|
+
- (<tt>String</tt>) <strong>type</strong>
|
1769
|
+
|
1770
|
+
|
1771
|
+
|
1772
|
+
</p><div class="docstring">
|
1773
|
+
<div class="discussion">
|
1774
|
+
<p>
|
1775
|
+
The string representation of this item.
|
1776
|
+
</p>
|
1777
|
+
|
1778
|
+
|
1779
|
+
</div>
|
1780
|
+
</div>
|
1781
|
+
<div class="tags">
|
1782
|
+
<h3>Returns:</h3>
|
1783
|
+
<ul class="return">
|
1784
|
+
|
1785
|
+
<li>
|
1786
|
+
|
1787
|
+
|
1788
|
+
<span class='type'>(<tt>String</tt>)</span>
|
1789
|
+
|
1790
|
+
|
1791
|
+
|
1792
|
+
—
|
1793
|
+
<div class='inline'><p>
|
1794
|
+
The string representation of this item.
|
1795
|
+
</p>
|
1796
|
+
</div>
|
1797
|
+
|
1798
|
+
</li>
|
1799
|
+
|
1800
|
+
</ul>
|
1801
|
+
|
1802
|
+
</div><table class="source_code">
|
1803
|
+
<tr>
|
1804
|
+
<td>
|
1805
|
+
<pre class="lines">
|
1806
|
+
|
1807
|
+
|
1808
|
+
39</pre>
|
1809
|
+
</td>
|
1810
|
+
<td>
|
1811
|
+
<pre class="code"><span class="info file"># File 'lib/box/item.rb', line 39</span>
|
1812
|
+
|
1813
|
+
<span class='kw'>def</span> <span class='id type'>type</span><span class='semicolon'>;</span> <span class='kw'>self</span><span class='period'>.</span><span class='id class'>class</span><span class='period'>.</span><span class='id type'>type</span><span class='semicolon'>;</span> <span class='kw'>end</span></pre>
|
1814
|
+
</td>
|
1815
|
+
</tr>
|
1816
|
+
</table>
|
1817
|
+
</div>
|
1818
|
+
|
1819
|
+
<div class="method_details ">
|
1820
|
+
<p class="signature " id="types-instance_method">
|
1821
|
+
|
1822
|
+
- (<tt>String</tt>) <strong>types</strong>
|
1823
|
+
|
1824
|
+
|
1825
|
+
|
1826
|
+
</p><div class="docstring">
|
1827
|
+
<div class="discussion">
|
1828
|
+
<p>
|
1829
|
+
The plural string representation of this item.
|
1830
|
+
</p>
|
1831
|
+
|
1832
|
+
|
1833
|
+
</div>
|
1834
|
+
</div>
|
1835
|
+
<div class="tags">
|
1836
|
+
<h3>Returns:</h3>
|
1837
|
+
<ul class="return">
|
1838
|
+
|
1839
|
+
<li>
|
1840
|
+
|
1841
|
+
|
1842
|
+
<span class='type'>(<tt>String</tt>)</span>
|
1843
|
+
|
1844
|
+
|
1845
|
+
|
1846
|
+
—
|
1847
|
+
<div class='inline'><p>
|
1848
|
+
The plural string representation of this item.
|
1849
|
+
</p>
|
1850
|
+
</div>
|
1851
|
+
|
1852
|
+
</li>
|
1853
|
+
|
1854
|
+
</ul>
|
1855
|
+
|
1856
|
+
</div><table class="source_code">
|
1857
|
+
<tr>
|
1858
|
+
<td>
|
1859
|
+
<pre class="lines">
|
1860
|
+
|
1861
|
+
|
1862
|
+
42</pre>
|
1863
|
+
</td>
|
1864
|
+
<td>
|
1865
|
+
<pre class="code"><span class="info file"># File 'lib/box/item.rb', line 42</span>
|
1866
|
+
|
1867
|
+
<span class='kw'>def</span> <span class='id types'>types</span><span class='semicolon'>;</span> <span class='kw'>self</span><span class='period'>.</span><span class='id class'>class</span><span class='period'>.</span><span class='id types'>types</span><span class='semicolon'>;</span> <span class='kw'>end</span></pre>
|
1868
|
+
</td>
|
1869
|
+
</tr>
|
1870
|
+
</table>
|
1871
|
+
</div>
|
1872
|
+
|
1873
|
+
</div>
|
1874
|
+
|
1875
|
+
</div>
|
1876
|
+
|
1877
|
+
<div id="footer">
|
1878
|
+
Generated on Mon Aug 8 13:05:22 2011 by
|
1879
|
+
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
1880
|
+
0.7.2 (ruby-1.9.2).
|
1881
|
+
</div>
|
1882
|
+
|
1883
|
+
</body>
|
1884
|
+
</html>
|