absorb_api 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +8 -0
- data/Gemfile +11 -0
- data/LICENSE.txt +21 -0
- data/README.md +203 -0
- data/Rakefile +2 -0
- data/absorb_api.gemspec +25 -0
- data/bin/console +14 -0
- data/bin/setup +8 -0
- data/doc/AbsorbApi.html +216 -0
- data/doc/AbsorbApi/Base.html +239 -0
- data/doc/AbsorbApi/Category.html +173 -0
- data/doc/AbsorbApi/Certificate.html +212 -0
- data/doc/AbsorbApi/Chapter.html +160 -0
- data/doc/AbsorbApi/Collection.html +180 -0
- data/doc/AbsorbApi/Configuration.html +188 -0
- data/doc/AbsorbApi/Course.html +534 -0
- data/doc/AbsorbApi/CourseEnrollment.html +437 -0
- data/doc/AbsorbApi/Curriculum.html +498 -0
- data/doc/AbsorbApi/Department.html +242 -0
- data/doc/AbsorbApi/LessonEnrollment.html +370 -0
- data/doc/AbsorbApi/Orm.html +201 -0
- data/doc/AbsorbApi/Relations.html +301 -0
- data/doc/AbsorbApi/ResourceNotFound.html +102 -0
- data/doc/AbsorbApi/RouteNotFound.html +102 -0
- data/doc/AbsorbApi/User.html +615 -0
- data/doc/AbsorbApi/ValidationError.html +102 -0
- data/doc/Gemfile.html +100 -0
- data/doc/Gemfile_lock.html +150 -0
- data/doc/LICENSE_txt.html +113 -0
- data/doc/README_md.html +340 -0
- data/doc/Rakefile.html +93 -0
- data/doc/absorb_api_gemspec.html +126 -0
- data/doc/bin/setup.html +97 -0
- data/doc/created.rid +26 -0
- data/doc/css/fonts.css +167 -0
- data/doc/css/rdoc.css +590 -0
- data/doc/fonts/Lato-Light.ttf +0 -0
- data/doc/fonts/Lato-LightItalic.ttf +0 -0
- data/doc/fonts/Lato-Regular.ttf +0 -0
- data/doc/fonts/Lato-RegularItalic.ttf +0 -0
- data/doc/fonts/SourceCodePro-Bold.ttf +0 -0
- data/doc/fonts/SourceCodePro-Regular.ttf +0 -0
- data/doc/images/add.png +0 -0
- data/doc/images/arrow_up.png +0 -0
- data/doc/images/brick.png +0 -0
- data/doc/images/brick_link.png +0 -0
- data/doc/images/bug.png +0 -0
- data/doc/images/bullet_black.png +0 -0
- data/doc/images/bullet_toggle_minus.png +0 -0
- data/doc/images/bullet_toggle_plus.png +0 -0
- data/doc/images/date.png +0 -0
- data/doc/images/delete.png +0 -0
- data/doc/images/find.png +0 -0
- data/doc/images/loadingAnimation.gif +0 -0
- data/doc/images/macFFBgHack.png +0 -0
- data/doc/images/package.png +0 -0
- data/doc/images/page_green.png +0 -0
- data/doc/images/page_white_text.png +0 -0
- data/doc/images/page_white_width.png +0 -0
- data/doc/images/plugin.png +0 -0
- data/doc/images/ruby.png +0 -0
- data/doc/images/tag_blue.png +0 -0
- data/doc/images/tag_green.png +0 -0
- data/doc/images/transparent.png +0 -0
- data/doc/images/wrench.png +0 -0
- data/doc/images/wrench_orange.png +0 -0
- data/doc/images/zoom.png +0 -0
- data/doc/index.html +135 -0
- data/doc/js/darkfish.js +161 -0
- data/doc/js/jquery.js +4 -0
- data/doc/js/navigation.js +142 -0
- data/doc/js/navigation.js.gz +0 -0
- data/doc/js/search.js +109 -0
- data/doc/js/search_index.js +1 -0
- data/doc/js/search_index.js.gz +0 -0
- data/doc/js/searcher.js +228 -0
- data/doc/js/searcher.js.gz +0 -0
- data/doc/table_of_contents.html +218 -0
- data/lib/absorb_api.rb +26 -0
- data/lib/absorb_api/base.rb +31 -0
- data/lib/absorb_api/category.rb +7 -0
- data/lib/absorb_api/certificate.rb +7 -0
- data/lib/absorb_api/chapter.rb +7 -0
- data/lib/absorb_api/collection.rb +19 -0
- data/lib/absorb_api/configuration.rb +21 -0
- data/lib/absorb_api/course.rb +24 -0
- data/lib/absorb_api/course_enrollment.rb +33 -0
- data/lib/absorb_api/curriculum.rb +7 -0
- data/lib/absorb_api/department.rb +10 -0
- data/lib/absorb_api/lesson_enrollment.rb +5 -0
- data/lib/absorb_api/orm.rb +28 -0
- data/lib/absorb_api/relations.rb +62 -0
- data/lib/absorb_api/user.rb +27 -0
- data/lib/absorb_api/version.rb +3 -0
- metadata +168 -0
@@ -0,0 +1,534 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
|
3
|
+
<html>
|
4
|
+
<head>
|
5
|
+
<meta charset="UTF-8">
|
6
|
+
|
7
|
+
<title>class AbsorbApi::Course - RDoc Documentation</title>
|
8
|
+
|
9
|
+
<script type="text/javascript">
|
10
|
+
var rdoc_rel_prefix = "../";
|
11
|
+
</script>
|
12
|
+
|
13
|
+
<script src="../js/jquery.js"></script>
|
14
|
+
<script src="../js/darkfish.js"></script>
|
15
|
+
|
16
|
+
<link href="../css/fonts.css" rel="stylesheet">
|
17
|
+
<link href="../css/rdoc.css" rel="stylesheet">
|
18
|
+
|
19
|
+
|
20
|
+
|
21
|
+
<body id="top" role="document" class="class">
|
22
|
+
<nav role="navigation">
|
23
|
+
<div id="project-navigation">
|
24
|
+
<div id="home-section" role="region" title="Quick navigation" class="nav-section">
|
25
|
+
<h2>
|
26
|
+
<a href="../index.html" rel="home">Home</a>
|
27
|
+
</h2>
|
28
|
+
|
29
|
+
<div id="table-of-contents-navigation">
|
30
|
+
<a href="../table_of_contents.html#pages">Pages</a>
|
31
|
+
<a href="../table_of_contents.html#classes">Classes</a>
|
32
|
+
<a href="../table_of_contents.html#methods">Methods</a>
|
33
|
+
</div>
|
34
|
+
</div>
|
35
|
+
|
36
|
+
<div id="search-section" role="search" class="project-section initially-hidden">
|
37
|
+
<form action="#" method="get" accept-charset="utf-8">
|
38
|
+
<div id="search-field-wrapper">
|
39
|
+
<input id="search-field" role="combobox" aria-label="Search"
|
40
|
+
aria-autocomplete="list" aria-controls="search-results"
|
41
|
+
type="text" name="search" placeholder="Search" spellcheck="false"
|
42
|
+
title="Type to search, Up and Down to navigate, Enter to load">
|
43
|
+
</div>
|
44
|
+
|
45
|
+
<ul id="search-results" aria-label="Search Results"
|
46
|
+
aria-busy="false" aria-expanded="false"
|
47
|
+
aria-atomic="false" class="initially-hidden"></ul>
|
48
|
+
</form>
|
49
|
+
</div>
|
50
|
+
|
51
|
+
</div>
|
52
|
+
|
53
|
+
|
54
|
+
|
55
|
+
<div id="class-metadata">
|
56
|
+
|
57
|
+
<div id="parent-class-section" class="nav-section">
|
58
|
+
<h3>Parent</h3>
|
59
|
+
|
60
|
+
|
61
|
+
<p class="link"><a href="Base.html">AbsorbApi::Base</a>
|
62
|
+
|
63
|
+
</div>
|
64
|
+
|
65
|
+
<div id="includes-section" class="nav-section">
|
66
|
+
<h3>Included Modules</h3>
|
67
|
+
|
68
|
+
<ul class="link-list">
|
69
|
+
|
70
|
+
|
71
|
+
<li><a class="include" href="Orm.html">AbsorbApi::Orm</a>
|
72
|
+
|
73
|
+
|
74
|
+
|
75
|
+
<li><a class="include" href="Relations.html">AbsorbApi::Relations</a>
|
76
|
+
|
77
|
+
|
78
|
+
</ul>
|
79
|
+
</div>
|
80
|
+
|
81
|
+
|
82
|
+
<!-- Method Quickref -->
|
83
|
+
<div id="method-list-section" class="nav-section">
|
84
|
+
<h3>Methods</h3>
|
85
|
+
|
86
|
+
<ul class="link-list" role="directory">
|
87
|
+
|
88
|
+
<li ><a href="#method-c-enrollments_from_collection">::enrollments_from_collection</a>
|
89
|
+
|
90
|
+
</ul>
|
91
|
+
</div>
|
92
|
+
|
93
|
+
</div>
|
94
|
+
</nav>
|
95
|
+
|
96
|
+
<main role="main" aria-labelledby="class-AbsorbApi::Course">
|
97
|
+
<h1 id="class-AbsorbApi::Course" class="class">
|
98
|
+
class AbsorbApi::Course
|
99
|
+
</h1>
|
100
|
+
|
101
|
+
<section class="description">
|
102
|
+
|
103
|
+
</section>
|
104
|
+
|
105
|
+
|
106
|
+
|
107
|
+
|
108
|
+
<section id="5Buntitled-5D" class="documentation-section">
|
109
|
+
|
110
|
+
|
111
|
+
|
112
|
+
|
113
|
+
|
114
|
+
|
115
|
+
|
116
|
+
<section class="attribute-method-details" class="method-section">
|
117
|
+
<header>
|
118
|
+
<h3>Attributes</h3>
|
119
|
+
</header>
|
120
|
+
|
121
|
+
|
122
|
+
<div id="attribute-i-access_date" class="method-detail">
|
123
|
+
<div class="method-heading attribute-method-heading">
|
124
|
+
<span class="method-name">access_date</span><span
|
125
|
+
class="attribute-access-type">[RW]</span>
|
126
|
+
</div>
|
127
|
+
|
128
|
+
<div class="method-description">
|
129
|
+
|
130
|
+
|
131
|
+
|
132
|
+
</div>
|
133
|
+
</div>
|
134
|
+
|
135
|
+
<div id="attribute-i-active_status" class="method-detail">
|
136
|
+
<div class="method-heading attribute-method-heading">
|
137
|
+
<span class="method-name">active_status</span><span
|
138
|
+
class="attribute-access-type">[RW]</span>
|
139
|
+
</div>
|
140
|
+
|
141
|
+
<div class="method-description">
|
142
|
+
|
143
|
+
|
144
|
+
|
145
|
+
</div>
|
146
|
+
</div>
|
147
|
+
|
148
|
+
<div id="attribute-i-allow_course_evaluation" class="method-detail">
|
149
|
+
<div class="method-heading attribute-method-heading">
|
150
|
+
<span class="method-name">allow_course_evaluation</span><span
|
151
|
+
class="attribute-access-type">[RW]</span>
|
152
|
+
</div>
|
153
|
+
|
154
|
+
<div class="method-description">
|
155
|
+
|
156
|
+
|
157
|
+
|
158
|
+
</div>
|
159
|
+
</div>
|
160
|
+
|
161
|
+
<div id="attribute-i-audience" class="method-detail">
|
162
|
+
<div class="method-heading attribute-method-heading">
|
163
|
+
<span class="method-name">audience</span><span
|
164
|
+
class="attribute-access-type">[RW]</span>
|
165
|
+
</div>
|
166
|
+
|
167
|
+
<div class="method-description">
|
168
|
+
|
169
|
+
|
170
|
+
|
171
|
+
</div>
|
172
|
+
</div>
|
173
|
+
|
174
|
+
<div id="attribute-i-category_id" class="method-detail">
|
175
|
+
<div class="method-heading attribute-method-heading">
|
176
|
+
<span class="method-name">category_id</span><span
|
177
|
+
class="attribute-access-type">[RW]</span>
|
178
|
+
</div>
|
179
|
+
|
180
|
+
<div class="method-description">
|
181
|
+
|
182
|
+
|
183
|
+
|
184
|
+
</div>
|
185
|
+
</div>
|
186
|
+
|
187
|
+
<div id="attribute-i-certificate_url" class="method-detail">
|
188
|
+
<div class="method-heading attribute-method-heading">
|
189
|
+
<span class="method-name">certificate_url</span><span
|
190
|
+
class="attribute-access-type">[RW]</span>
|
191
|
+
</div>
|
192
|
+
|
193
|
+
<div class="method-description">
|
194
|
+
|
195
|
+
|
196
|
+
|
197
|
+
</div>
|
198
|
+
</div>
|
199
|
+
|
200
|
+
<div id="attribute-i-company_cost" class="method-detail">
|
201
|
+
<div class="method-heading attribute-method-heading">
|
202
|
+
<span class="method-name">company_cost</span><span
|
203
|
+
class="attribute-access-type">[RW]</span>
|
204
|
+
</div>
|
205
|
+
|
206
|
+
<div class="method-description">
|
207
|
+
|
208
|
+
|
209
|
+
|
210
|
+
</div>
|
211
|
+
</div>
|
212
|
+
|
213
|
+
<div id="attribute-i-company_time" class="method-detail">
|
214
|
+
<div class="method-heading attribute-method-heading">
|
215
|
+
<span class="method-name">company_time</span><span
|
216
|
+
class="attribute-access-type">[RW]</span>
|
217
|
+
</div>
|
218
|
+
|
219
|
+
<div class="method-description">
|
220
|
+
|
221
|
+
|
222
|
+
|
223
|
+
</div>
|
224
|
+
</div>
|
225
|
+
|
226
|
+
<div id="attribute-i-competency_definition_ids" class="method-detail">
|
227
|
+
<div class="method-heading attribute-method-heading">
|
228
|
+
<span class="method-name">competency_definition_ids</span><span
|
229
|
+
class="attribute-access-type">[RW]</span>
|
230
|
+
</div>
|
231
|
+
|
232
|
+
<div class="method-description">
|
233
|
+
|
234
|
+
|
235
|
+
|
236
|
+
</div>
|
237
|
+
</div>
|
238
|
+
|
239
|
+
<div id="attribute-i-description" class="method-detail">
|
240
|
+
<div class="method-heading attribute-method-heading">
|
241
|
+
<span class="method-name">description</span><span
|
242
|
+
class="attribute-access-type">[RW]</span>
|
243
|
+
</div>
|
244
|
+
|
245
|
+
<div class="method-description">
|
246
|
+
|
247
|
+
|
248
|
+
|
249
|
+
</div>
|
250
|
+
</div>
|
251
|
+
|
252
|
+
<div id="attribute-i-editor_ids" class="method-detail">
|
253
|
+
<div class="method-heading attribute-method-heading">
|
254
|
+
<span class="method-name">editor_ids</span><span
|
255
|
+
class="attribute-access-type">[RW]</span>
|
256
|
+
</div>
|
257
|
+
|
258
|
+
<div class="method-description">
|
259
|
+
|
260
|
+
|
261
|
+
|
262
|
+
</div>
|
263
|
+
</div>
|
264
|
+
|
265
|
+
<div id="attribute-i-expire_duration" class="method-detail">
|
266
|
+
<div class="method-heading attribute-method-heading">
|
267
|
+
<span class="method-name">expire_duration</span><span
|
268
|
+
class="attribute-access-type">[RW]</span>
|
269
|
+
</div>
|
270
|
+
|
271
|
+
<div class="method-description">
|
272
|
+
|
273
|
+
|
274
|
+
|
275
|
+
</div>
|
276
|
+
</div>
|
277
|
+
|
278
|
+
<div id="attribute-i-expire_type" class="method-detail">
|
279
|
+
<div class="method-heading attribute-method-heading">
|
280
|
+
<span class="method-name">expire_type</span><span
|
281
|
+
class="attribute-access-type">[RW]</span>
|
282
|
+
</div>
|
283
|
+
|
284
|
+
<div class="method-description">
|
285
|
+
|
286
|
+
|
287
|
+
|
288
|
+
</div>
|
289
|
+
</div>
|
290
|
+
|
291
|
+
<div id="attribute-i-expiry_date" class="method-detail">
|
292
|
+
<div class="method-heading attribute-method-heading">
|
293
|
+
<span class="method-name">expiry_date</span><span
|
294
|
+
class="attribute-access-type">[RW]</span>
|
295
|
+
</div>
|
296
|
+
|
297
|
+
<div class="method-description">
|
298
|
+
|
299
|
+
|
300
|
+
|
301
|
+
</div>
|
302
|
+
</div>
|
303
|
+
|
304
|
+
<div id="attribute-i-external_id" class="method-detail">
|
305
|
+
<div class="method-heading attribute-method-heading">
|
306
|
+
<span class="method-name">external_id</span><span
|
307
|
+
class="attribute-access-type">[RW]</span>
|
308
|
+
</div>
|
309
|
+
|
310
|
+
<div class="method-description">
|
311
|
+
|
312
|
+
|
313
|
+
|
314
|
+
</div>
|
315
|
+
</div>
|
316
|
+
|
317
|
+
<div id="attribute-i-goals" class="method-detail">
|
318
|
+
<div class="method-heading attribute-method-heading">
|
319
|
+
<span class="method-name">goals</span><span
|
320
|
+
class="attribute-access-type">[RW]</span>
|
321
|
+
</div>
|
322
|
+
|
323
|
+
<div class="method-description">
|
324
|
+
|
325
|
+
|
326
|
+
|
327
|
+
</div>
|
328
|
+
</div>
|
329
|
+
|
330
|
+
<div id="attribute-i-id" class="method-detail">
|
331
|
+
<div class="method-heading attribute-method-heading">
|
332
|
+
<span class="method-name">id</span><span
|
333
|
+
class="attribute-access-type">[RW]</span>
|
334
|
+
</div>
|
335
|
+
|
336
|
+
<div class="method-description">
|
337
|
+
|
338
|
+
|
339
|
+
|
340
|
+
</div>
|
341
|
+
</div>
|
342
|
+
|
343
|
+
<div id="attribute-i-learner_cost" class="method-detail">
|
344
|
+
<div class="method-heading attribute-method-heading">
|
345
|
+
<span class="method-name">learner_cost</span><span
|
346
|
+
class="attribute-access-type">[RW]</span>
|
347
|
+
</div>
|
348
|
+
|
349
|
+
<div class="method-description">
|
350
|
+
|
351
|
+
|
352
|
+
|
353
|
+
</div>
|
354
|
+
</div>
|
355
|
+
|
356
|
+
<div id="attribute-i-learner_time" class="method-detail">
|
357
|
+
<div class="method-heading attribute-method-heading">
|
358
|
+
<span class="method-name">learner_time</span><span
|
359
|
+
class="attribute-access-type">[RW]</span>
|
360
|
+
</div>
|
361
|
+
|
362
|
+
<div class="method-description">
|
363
|
+
|
364
|
+
|
365
|
+
|
366
|
+
</div>
|
367
|
+
</div>
|
368
|
+
|
369
|
+
<div id="attribute-i-name" class="method-detail">
|
370
|
+
<div class="method-heading attribute-method-heading">
|
371
|
+
<span class="method-name">name</span><span
|
372
|
+
class="attribute-access-type">[RW]</span>
|
373
|
+
</div>
|
374
|
+
|
375
|
+
<div class="method-description">
|
376
|
+
|
377
|
+
|
378
|
+
|
379
|
+
</div>
|
380
|
+
</div>
|
381
|
+
|
382
|
+
<div id="attribute-i-notes" class="method-detail">
|
383
|
+
<div class="method-heading attribute-method-heading">
|
384
|
+
<span class="method-name">notes</span><span
|
385
|
+
class="attribute-access-type">[RW]</span>
|
386
|
+
</div>
|
387
|
+
|
388
|
+
<div class="method-description">
|
389
|
+
|
390
|
+
|
391
|
+
|
392
|
+
</div>
|
393
|
+
</div>
|
394
|
+
|
395
|
+
<div id="attribute-i-post_enrollment_course_ids" class="method-detail">
|
396
|
+
<div class="method-heading attribute-method-heading">
|
397
|
+
<span class="method-name">post_enrollment_course_ids</span><span
|
398
|
+
class="attribute-access-type">[RW]</span>
|
399
|
+
</div>
|
400
|
+
|
401
|
+
<div class="method-description">
|
402
|
+
|
403
|
+
|
404
|
+
|
405
|
+
</div>
|
406
|
+
</div>
|
407
|
+
|
408
|
+
<div id="attribute-i-prerequisite_course_ids" class="method-detail">
|
409
|
+
<div class="method-heading attribute-method-heading">
|
410
|
+
<span class="method-name">prerequisite_course_ids</span><span
|
411
|
+
class="attribute-access-type">[RW]</span>
|
412
|
+
</div>
|
413
|
+
|
414
|
+
<div class="method-description">
|
415
|
+
|
416
|
+
|
417
|
+
|
418
|
+
</div>
|
419
|
+
</div>
|
420
|
+
|
421
|
+
<div id="attribute-i-prices" class="method-detail">
|
422
|
+
<div class="method-heading attribute-method-heading">
|
423
|
+
<span class="method-name">prices</span><span
|
424
|
+
class="attribute-access-type">[RW]</span>
|
425
|
+
</div>
|
426
|
+
|
427
|
+
<div class="method-description">
|
428
|
+
|
429
|
+
|
430
|
+
|
431
|
+
</div>
|
432
|
+
</div>
|
433
|
+
|
434
|
+
<div id="attribute-i-resource_ids" class="method-detail">
|
435
|
+
<div class="method-heading attribute-method-heading">
|
436
|
+
<span class="method-name">resource_ids</span><span
|
437
|
+
class="attribute-access-type">[RW]</span>
|
438
|
+
</div>
|
439
|
+
|
440
|
+
<div class="method-description">
|
441
|
+
|
442
|
+
|
443
|
+
|
444
|
+
</div>
|
445
|
+
</div>
|
446
|
+
|
447
|
+
<div id="attribute-i-tag_ids" class="method-detail">
|
448
|
+
<div class="method-heading attribute-method-heading">
|
449
|
+
<span class="method-name">tag_ids</span><span
|
450
|
+
class="attribute-access-type">[RW]</span>
|
451
|
+
</div>
|
452
|
+
|
453
|
+
<div class="method-description">
|
454
|
+
|
455
|
+
|
456
|
+
|
457
|
+
</div>
|
458
|
+
</div>
|
459
|
+
|
460
|
+
<div id="attribute-i-vendor" class="method-detail">
|
461
|
+
<div class="method-heading attribute-method-heading">
|
462
|
+
<span class="method-name">vendor</span><span
|
463
|
+
class="attribute-access-type">[RW]</span>
|
464
|
+
</div>
|
465
|
+
|
466
|
+
<div class="method-description">
|
467
|
+
|
468
|
+
|
469
|
+
|
470
|
+
</div>
|
471
|
+
</div>
|
472
|
+
|
473
|
+
</section>
|
474
|
+
|
475
|
+
|
476
|
+
|
477
|
+
<section id="public-class-5Buntitled-5D-method-details" class="method-section">
|
478
|
+
<header>
|
479
|
+
<h3>Public Class Methods</h3>
|
480
|
+
</header>
|
481
|
+
|
482
|
+
|
483
|
+
<div id="method-c-enrollments_from_collection" class="method-detail ">
|
484
|
+
|
485
|
+
<div class="method-heading">
|
486
|
+
<span class="method-name">enrollments_from_collection</span><span
|
487
|
+
class="method-args">(courses)</span>
|
488
|
+
|
489
|
+
<span class="method-click-advice">click to toggle source</span>
|
490
|
+
|
491
|
+
</div>
|
492
|
+
|
493
|
+
|
494
|
+
<div class="method-description">
|
495
|
+
|
496
|
+
<p>gets all associated enrollments given a collection of courses all calls are
|
497
|
+
called in parallel</p>
|
498
|
+
|
499
|
+
|
500
|
+
|
501
|
+
|
502
|
+
<div class="method-source-code" id="enrollments_from_collection-source">
|
503
|
+
<pre><span class="ruby-comment"># File lib/absorb_api/course.rb, line 14</span>
|
504
|
+
<span class="ruby-keyword">def</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">enrollments_from_collection</span>(<span class="ruby-identifier">courses</span>)
|
505
|
+
<span class="ruby-identifier">enrollments</span> = []
|
506
|
+
<span class="ruby-identifier">api</span>.<span class="ruby-identifier">in_parallel</span> <span class="ruby-keyword">do</span>
|
507
|
+
<span class="ruby-identifier">courses</span>.<span class="ruby-identifier">reject</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">course</span><span class="ruby-operator">|</span> <span class="ruby-constant">AbsorbApi</span>.<span class="ruby-identifier">configuration</span>.<span class="ruby-identifier">ignored_course_ids</span>.<span class="ruby-identifier">include?</span> <span class="ruby-identifier">course</span>.<span class="ruby-identifier">id</span> }.<span class="ruby-identifier">each</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">course</span><span class="ruby-operator">|</span>
|
508
|
+
<span class="ruby-identifier">enrollments</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">api</span>.<span class="ruby-identifier">get</span>(<span class="ruby-node">"courses/#{course.id}/enrollments"</span>)
|
509
|
+
<span class="ruby-keyword">end</span>
|
510
|
+
<span class="ruby-keyword">end</span>
|
511
|
+
<span class="ruby-identifier">enrollments</span>.<span class="ruby-identifier">map</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">response</span><span class="ruby-operator">|</span> <span class="ruby-identifier">response</span>.<span class="ruby-identifier">body</span>.<span class="ruby-identifier">map</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">attrs</span><span class="ruby-operator">|</span> <span class="ruby-constant">CourseEnrollment</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">attrs</span>) } }.<span class="ruby-identifier">flatten</span>
|
512
|
+
<span class="ruby-keyword">end</span></pre>
|
513
|
+
</div>
|
514
|
+
|
515
|
+
</div>
|
516
|
+
|
517
|
+
|
518
|
+
|
519
|
+
|
520
|
+
</div>
|
521
|
+
|
522
|
+
|
523
|
+
</section>
|
524
|
+
|
525
|
+
</section>
|
526
|
+
</main>
|
527
|
+
|
528
|
+
|
529
|
+
<footer id="validator-badges" role="contentinfo">
|
530
|
+
<p><a href="http://validator.w3.org/check/referer">Validate</a>
|
531
|
+
<p>Generated by <a href="http://docs.seattlerb.org/rdoc/">RDoc</a> 4.2.1.
|
532
|
+
<p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
|
533
|
+
</footer>
|
534
|
+
|