absorb_api 0.2.0 → 0.9.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +866 -0
- data/.ruby-version +1 -0
- data/CODE_OF_CONDUCT.md +46 -0
- data/Gemfile +3 -10
- data/README.md +0 -2
- data/Rakefile +3 -1
- data/absorb_api.gemspec +30 -16
- data/bin/console +11 -5
- data/doc/AbsorbApi.html +33 -64
- data/doc/AbsorbApi/Api.html +358 -0
- data/doc/AbsorbApi/Authorize.html +263 -0
- data/doc/AbsorbApi/Category.html +3 -2
- data/doc/AbsorbApi/Certificate.html +3 -2
- data/doc/AbsorbApi/Chapter.html +3 -2
- data/doc/AbsorbApi/Collection.html +3 -2
- data/doc/AbsorbApi/Configuration.html +3 -28
- data/doc/AbsorbApi/Course.html +3 -71
- data/doc/AbsorbApi/CourseEnrollment.html +6 -58
- data/doc/AbsorbApi/Create.html +164 -0
- data/doc/AbsorbApi/Curriculum.html +3 -2
- data/doc/AbsorbApi/Department.html +4 -14
- data/doc/AbsorbApi/Lesson.html +3 -2
- data/doc/AbsorbApi/LessonEnrollment.html +3 -2
- data/doc/AbsorbApi/Prerequisite.html +3 -2
- data/doc/AbsorbApi/Record.html +360 -0
- data/doc/AbsorbApi/Relations.html +2 -196
- data/doc/AbsorbApi/Relations/ClassMethods.html +197 -0
- data/doc/AbsorbApi/Resource.html +3 -2
- data/doc/AbsorbApi/ResourceNotFound.html +2 -1
- data/doc/AbsorbApi/Role.html +3 -2
- data/doc/AbsorbApi/RouteNotFound.html +2 -1
- data/doc/AbsorbApi/SessionSchedule.html +3 -2
- data/doc/AbsorbApi/Tag.html +4 -14
- data/doc/AbsorbApi/User.html +85 -35
- data/doc/AbsorbApi/ValidationError.html +2 -1
- data/doc/AbsorbApi/Where.html +162 -0
- data/doc/CODE_OF_CONDUCT_md.html +196 -0
- data/doc/Gemfile.html +8 -8
- data/doc/Gemfile_lock.html +57 -29
- data/doc/Icon/r.html +96 -0
- data/doc/LICENSE_txt.html +6 -1
- data/doc/Object.html +159 -0
- data/doc/README_md.html +6 -3
- data/doc/Rakefile.html +7 -2
- data/doc/absorb_api_gemspec.html +24 -7
- data/doc/bin/setup.html +6 -1
- data/doc/created.rid +34 -30
- data/doc/css/fonts.css +6 -6
- data/doc/index.html +19 -4
- data/doc/js/darkfish.js +7 -7
- data/doc/js/search_index.js +1 -1
- data/doc/js/search_index.js.gz +0 -0
- data/doc/js/searcher.js +1 -0
- data/doc/js/searcher.js.gz +0 -0
- data/doc/table_of_contents.html +118 -31
- data/lib/absorb_api.rb +43 -29
- data/lib/absorb_api/api.rb +69 -5
- data/lib/absorb_api/authorize.rb +37 -7
- data/lib/absorb_api/category.rb +3 -1
- data/lib/absorb_api/certificate.rb +5 -2
- data/lib/absorb_api/chapter.rb +3 -1
- data/lib/absorb_api/collection.rb +2 -19
- data/lib/absorb_api/configuration.rb +14 -12
- data/lib/absorb_api/course.rb +11 -25
- data/lib/absorb_api/course_enrollment.rb +13 -26
- data/lib/absorb_api/create.rb +19 -0
- data/lib/absorb_api/curriculum.rb +11 -2
- data/lib/absorb_api/department.rb +10 -4
- data/lib/absorb_api/lesson.rb +5 -2
- data/lib/absorb_api/lesson_enrollment.rb +8 -2
- data/lib/absorb_api/prerequisite.rb +5 -2
- data/lib/absorb_api/record.rb +58 -0
- data/lib/absorb_api/relations.rb +42 -40
- data/lib/absorb_api/resource.rb +3 -1
- data/lib/absorb_api/role.rb +3 -1
- data/lib/absorb_api/session_schedule.rb +6 -2
- data/lib/absorb_api/tag.rb +6 -3
- data/lib/absorb_api/user.rb +13 -29
- data/lib/absorb_api/version.rb +3 -1
- data/lib/absorb_api/where.rb +17 -0
- metadata +133 -8
- data/lib/absorb_api/base.rb +0 -12
- data/lib/absorb_api/orm.rb +0 -36
@@ -0,0 +1,263 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
|
3
|
+
<html>
|
4
|
+
<head>
|
5
|
+
<meta charset="UTF-8">
|
6
|
+
|
7
|
+
<title>class AbsorbApi::Authorize - RDoc Documentation</title>
|
8
|
+
|
9
|
+
<script type="text/javascript">
|
10
|
+
var rdoc_rel_prefix = "../";
|
11
|
+
var index_rel_prefix = "../";
|
12
|
+
</script>
|
13
|
+
|
14
|
+
<script src="../js/jquery.js"></script>
|
15
|
+
<script src="../js/darkfish.js"></script>
|
16
|
+
|
17
|
+
<link href="../css/fonts.css" rel="stylesheet">
|
18
|
+
<link href="../css/rdoc.css" rel="stylesheet">
|
19
|
+
|
20
|
+
|
21
|
+
|
22
|
+
<body id="top" role="document" class="class">
|
23
|
+
<nav role="navigation">
|
24
|
+
<div id="project-navigation">
|
25
|
+
<div id="home-section" role="region" title="Quick navigation" class="nav-section">
|
26
|
+
<h2>
|
27
|
+
<a href="../index.html" rel="home">Home</a>
|
28
|
+
</h2>
|
29
|
+
|
30
|
+
<div id="table-of-contents-navigation">
|
31
|
+
<a href="../table_of_contents.html#pages">Pages</a>
|
32
|
+
<a href="../table_of_contents.html#classes">Classes</a>
|
33
|
+
<a href="../table_of_contents.html#methods">Methods</a>
|
34
|
+
</div>
|
35
|
+
</div>
|
36
|
+
|
37
|
+
<div id="search-section" role="search" class="project-section initially-hidden">
|
38
|
+
<form action="#" method="get" accept-charset="utf-8">
|
39
|
+
<div id="search-field-wrapper">
|
40
|
+
<input id="search-field" role="combobox" aria-label="Search"
|
41
|
+
aria-autocomplete="list" aria-controls="search-results"
|
42
|
+
type="text" name="search" placeholder="Search" spellcheck="false"
|
43
|
+
title="Type to search, Up and Down to navigate, Enter to load">
|
44
|
+
</div>
|
45
|
+
|
46
|
+
<ul id="search-results" aria-label="Search Results"
|
47
|
+
aria-busy="false" aria-expanded="false"
|
48
|
+
aria-atomic="false" class="initially-hidden"></ul>
|
49
|
+
</form>
|
50
|
+
</div>
|
51
|
+
|
52
|
+
</div>
|
53
|
+
|
54
|
+
|
55
|
+
|
56
|
+
<div id="class-metadata">
|
57
|
+
|
58
|
+
<div id="parent-class-section" class="nav-section">
|
59
|
+
<h3>Parent</h3>
|
60
|
+
|
61
|
+
|
62
|
+
<p class="link"><a href="../Object.html">Object</a>
|
63
|
+
|
64
|
+
</div>
|
65
|
+
|
66
|
+
|
67
|
+
|
68
|
+
<!-- Method Quickref -->
|
69
|
+
<div id="method-list-section" class="nav-section">
|
70
|
+
<h3>Methods</h3>
|
71
|
+
|
72
|
+
<ul class="link-list" role="directory">
|
73
|
+
|
74
|
+
<li ><a href="#method-c-new">::new</a>
|
75
|
+
|
76
|
+
<li ><a href="#method-i-expired-3F">#expired?</a>
|
77
|
+
|
78
|
+
<li ><a href="#method-i-token">#token</a>
|
79
|
+
|
80
|
+
</ul>
|
81
|
+
</div>
|
82
|
+
|
83
|
+
</div>
|
84
|
+
</nav>
|
85
|
+
|
86
|
+
<main role="main" aria-labelledby="class-AbsorbApi::Authorize">
|
87
|
+
<h1 id="class-AbsorbApi::Authorize" class="class">
|
88
|
+
class AbsorbApi::Authorize
|
89
|
+
</h1>
|
90
|
+
|
91
|
+
<section class="description">
|
92
|
+
|
93
|
+
</section>
|
94
|
+
|
95
|
+
|
96
|
+
|
97
|
+
|
98
|
+
<section id="5Buntitled-5D" class="documentation-section">
|
99
|
+
|
100
|
+
|
101
|
+
|
102
|
+
|
103
|
+
|
104
|
+
|
105
|
+
|
106
|
+
<section class="attribute-method-details" class="method-section">
|
107
|
+
<header>
|
108
|
+
<h3>Attributes</h3>
|
109
|
+
</header>
|
110
|
+
|
111
|
+
|
112
|
+
<div id="attribute-i-created_at" class="method-detail">
|
113
|
+
<div class="method-heading attribute-method-heading">
|
114
|
+
<span class="method-name">created_at</span><span
|
115
|
+
class="attribute-access-type">[RW]</span>
|
116
|
+
</div>
|
117
|
+
|
118
|
+
<div class="method-description">
|
119
|
+
|
120
|
+
|
121
|
+
|
122
|
+
</div>
|
123
|
+
</div>
|
124
|
+
|
125
|
+
</section>
|
126
|
+
|
127
|
+
|
128
|
+
|
129
|
+
<section id="public-class-5Buntitled-5D-method-details" class="method-section">
|
130
|
+
<header>
|
131
|
+
<h3>Public Class Methods</h3>
|
132
|
+
</header>
|
133
|
+
|
134
|
+
|
135
|
+
<div id="method-c-new" class="method-detail ">
|
136
|
+
|
137
|
+
<div class="method-heading">
|
138
|
+
<span class="method-name">new</span><span
|
139
|
+
class="method-args">()</span>
|
140
|
+
|
141
|
+
<span class="method-click-advice">click to toggle source</span>
|
142
|
+
|
143
|
+
</div>
|
144
|
+
|
145
|
+
|
146
|
+
<div class="method-description">
|
147
|
+
|
148
|
+
|
149
|
+
|
150
|
+
|
151
|
+
|
152
|
+
|
153
|
+
<div class="method-source-code" id="new-source">
|
154
|
+
<pre><span class="ruby-comment"># File lib/absorb_api/authorize.rb, line 6</span>
|
155
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">initialize</span>
|
156
|
+
<span class="ruby-identifier">token</span>
|
157
|
+
<span class="ruby-keyword">end</span></pre>
|
158
|
+
</div>
|
159
|
+
|
160
|
+
</div>
|
161
|
+
|
162
|
+
|
163
|
+
|
164
|
+
|
165
|
+
</div>
|
166
|
+
|
167
|
+
|
168
|
+
</section>
|
169
|
+
|
170
|
+
<section id="public-instance-5Buntitled-5D-method-details" class="method-section">
|
171
|
+
<header>
|
172
|
+
<h3>Public Instance Methods</h3>
|
173
|
+
</header>
|
174
|
+
|
175
|
+
|
176
|
+
<div id="method-i-expired-3F" class="method-detail ">
|
177
|
+
|
178
|
+
<div class="method-heading">
|
179
|
+
<span class="method-name">expired?</span><span
|
180
|
+
class="method-args">()</span>
|
181
|
+
|
182
|
+
<span class="method-click-advice">click to toggle source</span>
|
183
|
+
|
184
|
+
</div>
|
185
|
+
|
186
|
+
|
187
|
+
<div class="method-description">
|
188
|
+
|
189
|
+
|
190
|
+
|
191
|
+
|
192
|
+
|
193
|
+
|
194
|
+
<div class="method-source-code" id="expired-3F-source">
|
195
|
+
<pre><span class="ruby-comment"># File lib/absorb_api/authorize.rb, line 10</span>
|
196
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">expired?</span>
|
197
|
+
<span class="ruby-keyword">return</span> <span class="ruby-keyword">true</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">created_at</span>.<span class="ruby-identifier">blank?</span>
|
198
|
+
|
199
|
+
<span class="ruby-constant">DateTime</span>.<span class="ruby-identifier">now</span> <span class="ruby-operator">>=</span> <span class="ruby-identifier">created_at</span> <span class="ruby-operator">+</span> <span class="ruby-value">4</span>.<span class="ruby-identifier">hours</span>
|
200
|
+
<span class="ruby-keyword">end</span></pre>
|
201
|
+
</div>
|
202
|
+
|
203
|
+
</div>
|
204
|
+
|
205
|
+
|
206
|
+
|
207
|
+
|
208
|
+
</div>
|
209
|
+
|
210
|
+
|
211
|
+
<div id="method-i-token" class="method-detail ">
|
212
|
+
|
213
|
+
<div class="method-heading">
|
214
|
+
<span class="method-name">token</span><span
|
215
|
+
class="method-args">()</span>
|
216
|
+
|
217
|
+
<span class="method-click-advice">click to toggle source</span>
|
218
|
+
|
219
|
+
</div>
|
220
|
+
|
221
|
+
|
222
|
+
<div class="method-description">
|
223
|
+
|
224
|
+
|
225
|
+
|
226
|
+
|
227
|
+
|
228
|
+
|
229
|
+
<div class="method-source-code" id="token-source">
|
230
|
+
<pre><span class="ruby-comment"># File lib/absorb_api/authorize.rb, line 16</span>
|
231
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">token</span>
|
232
|
+
<span class="ruby-keyword">return</span> <span class="ruby-ivar">@token</span> <span class="ruby-keyword">unless</span> <span class="ruby-identifier">expired?</span>
|
233
|
+
|
234
|
+
<span class="ruby-ivar">@token</span> = <span class="ruby-constant">ActiveSupport</span><span class="ruby-operator">::</span><span class="ruby-constant">JSON</span>.<span class="ruby-identifier">decode</span>(<span class="ruby-identifier">connection</span>.<span class="ruby-identifier">post</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">req</span><span class="ruby-operator">|</span>
|
235
|
+
<span class="ruby-identifier">req</span>.<span class="ruby-identifier">url</span> <span class="ruby-string">"Authenticate"</span>
|
236
|
+
<span class="ruby-identifier">req</span>.<span class="ruby-identifier">headers</span>[<span class="ruby-string">"Content-Type"</span>] = <span class="ruby-string">"application/json"</span>
|
237
|
+
<span class="ruby-identifier">req</span>.<span class="ruby-identifier">headers</span>[<span class="ruby-string">"accept"</span>] = <span class="ruby-string">"json"</span>
|
238
|
+
<span class="ruby-identifier">req</span>.<span class="ruby-identifier">body</span> = <span class="ruby-identifier">payload</span>.<span class="ruby-identifier">to_json</span>
|
239
|
+
<span class="ruby-keyword">end</span>.<span class="ruby-identifier">body</span>)
|
240
|
+
<span class="ruby-ivar">@created_at</span> = <span class="ruby-constant">DateTime</span>.<span class="ruby-identifier">now</span>
|
241
|
+
<span class="ruby-keyword">end</span></pre>
|
242
|
+
</div>
|
243
|
+
|
244
|
+
</div>
|
245
|
+
|
246
|
+
|
247
|
+
|
248
|
+
|
249
|
+
</div>
|
250
|
+
|
251
|
+
|
252
|
+
</section>
|
253
|
+
|
254
|
+
</section>
|
255
|
+
</main>
|
256
|
+
|
257
|
+
|
258
|
+
<footer id="validator-badges" role="contentinfo">
|
259
|
+
<p><a href="http://validator.w3.org/check/referer">Validate</a>
|
260
|
+
<p>Generated by <a href="https://rdoc.github.io/rdoc">RDoc</a> 5.1.0.
|
261
|
+
<p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
|
262
|
+
</footer>
|
263
|
+
|
data/doc/AbsorbApi/Category.html
CHANGED
@@ -8,6 +8,7 @@
|
|
8
8
|
|
9
9
|
<script type="text/javascript">
|
10
10
|
var rdoc_rel_prefix = "../";
|
11
|
+
var index_rel_prefix = "../";
|
11
12
|
</script>
|
12
13
|
|
13
14
|
<script src="../js/jquery.js"></script>
|
@@ -58,7 +59,7 @@
|
|
58
59
|
<h3>Parent</h3>
|
59
60
|
|
60
61
|
|
61
|
-
<p class="link"
|
62
|
+
<p class="link">Record
|
62
63
|
|
63
64
|
</div>
|
64
65
|
|
@@ -156,7 +157,7 @@
|
|
156
157
|
|
157
158
|
<footer id="validator-badges" role="contentinfo">
|
158
159
|
<p><a href="http://validator.w3.org/check/referer">Validate</a>
|
159
|
-
<p>Generated by <a href="
|
160
|
+
<p>Generated by <a href="https://rdoc.github.io/rdoc">RDoc</a> 5.1.0.
|
160
161
|
<p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
|
161
162
|
</footer>
|
162
163
|
|
@@ -8,6 +8,7 @@
|
|
8
8
|
|
9
9
|
<script type="text/javascript">
|
10
10
|
var rdoc_rel_prefix = "../";
|
11
|
+
var index_rel_prefix = "../";
|
11
12
|
</script>
|
12
13
|
|
13
14
|
<script src="../js/jquery.js"></script>
|
@@ -58,7 +59,7 @@
|
|
58
59
|
<h3>Parent</h3>
|
59
60
|
|
60
61
|
|
61
|
-
<p class="link"
|
62
|
+
<p class="link">Record
|
62
63
|
|
63
64
|
</div>
|
64
65
|
|
@@ -195,7 +196,7 @@
|
|
195
196
|
|
196
197
|
<footer id="validator-badges" role="contentinfo">
|
197
198
|
<p><a href="http://validator.w3.org/check/referer">Validate</a>
|
198
|
-
<p>Generated by <a href="
|
199
|
+
<p>Generated by <a href="https://rdoc.github.io/rdoc">RDoc</a> 5.1.0.
|
199
200
|
<p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
|
200
201
|
</footer>
|
201
202
|
|
data/doc/AbsorbApi/Chapter.html
CHANGED
@@ -8,6 +8,7 @@
|
|
8
8
|
|
9
9
|
<script type="text/javascript">
|
10
10
|
var rdoc_rel_prefix = "../";
|
11
|
+
var index_rel_prefix = "../";
|
11
12
|
</script>
|
12
13
|
|
13
14
|
<script src="../js/jquery.js"></script>
|
@@ -58,7 +59,7 @@
|
|
58
59
|
<h3>Parent</h3>
|
59
60
|
|
60
61
|
|
61
|
-
<p class="link"
|
62
|
+
<p class="link">Record
|
62
63
|
|
63
64
|
</div>
|
64
65
|
|
@@ -143,7 +144,7 @@
|
|
143
144
|
|
144
145
|
<footer id="validator-badges" role="contentinfo">
|
145
146
|
<p><a href="http://validator.w3.org/check/referer">Validate</a>
|
146
|
-
<p>Generated by <a href="
|
147
|
+
<p>Generated by <a href="https://rdoc.github.io/rdoc">RDoc</a> 5.1.0.
|
147
148
|
<p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
|
148
149
|
</footer>
|
149
150
|
|
@@ -8,6 +8,7 @@
|
|
8
8
|
|
9
9
|
<script type="text/javascript">
|
10
10
|
var rdoc_rel_prefix = "../";
|
11
|
+
var index_rel_prefix = "../";
|
11
12
|
</script>
|
12
13
|
|
13
14
|
<script src="../js/jquery.js"></script>
|
@@ -151,7 +152,7 @@
|
|
151
152
|
|
152
153
|
|
153
154
|
<div class="method-source-code" id="new-source">
|
154
|
-
<pre><span class="ruby-comment"># File lib/absorb_api/collection.rb, line
|
155
|
+
<pre><span class="ruby-comment"># File lib/absorb_api/collection.rb, line 6</span>
|
155
156
|
<span class="ruby-keyword">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">elements</span>, <span class="ruby-identifier">metadata</span> = {})
|
156
157
|
<span class="ruby-keyword">super</span>(<span class="ruby-identifier">elements</span>)
|
157
158
|
<span class="ruby-ivar">@metadata</span> = <span class="ruby-identifier">metadata</span>
|
@@ -174,7 +175,7 @@
|
|
174
175
|
|
175
176
|
<footer id="validator-badges" role="contentinfo">
|
176
177
|
<p><a href="http://validator.w3.org/check/referer">Validate</a>
|
177
|
-
<p>Generated by <a href="
|
178
|
+
<p>Generated by <a href="https://rdoc.github.io/rdoc">RDoc</a> 5.1.0.
|
178
179
|
<p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
|
179
180
|
</footer>
|
180
181
|
|
@@ -8,6 +8,7 @@
|
|
8
8
|
|
9
9
|
<script type="text/javascript">
|
10
10
|
var rdoc_rel_prefix = "../";
|
11
|
+
var index_rel_prefix = "../";
|
11
12
|
</script>
|
12
13
|
|
13
14
|
<script src="../js/jquery.js"></script>
|
@@ -58,7 +59,7 @@
|
|
58
59
|
<h3>Parent</h3>
|
59
60
|
|
60
61
|
|
61
|
-
<p class="link">Object
|
62
|
+
<p class="link"><a href="../Object.html">Object</a>
|
62
63
|
|
63
64
|
</div>
|
64
65
|
|
@@ -130,32 +131,6 @@
|
|
130
131
|
|
131
132
|
|
132
133
|
|
133
|
-
</div>
|
134
|
-
</div>
|
135
|
-
|
136
|
-
<div id="attribute-i-ignored_course_ids" class="method-detail">
|
137
|
-
<div class="method-heading attribute-method-heading">
|
138
|
-
<span class="method-name">ignored_course_ids</span><span
|
139
|
-
class="attribute-access-type">[RW]</span>
|
140
|
-
</div>
|
141
|
-
|
142
|
-
<div class="method-description">
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
</div>
|
147
|
-
</div>
|
148
|
-
|
149
|
-
<div id="attribute-i-ignored_lesson_types" class="method-detail">
|
150
|
-
<div class="method-heading attribute-method-heading">
|
151
|
-
<span class="method-name">ignored_lesson_types</span><span
|
152
|
-
class="attribute-access-type">[RW]</span>
|
153
|
-
</div>
|
154
|
-
|
155
|
-
<div class="method-description">
|
156
|
-
|
157
|
-
|
158
|
-
|
159
134
|
</div>
|
160
135
|
</div>
|
161
136
|
|
@@ -182,7 +157,7 @@
|
|
182
157
|
|
183
158
|
<footer id="validator-badges" role="contentinfo">
|
184
159
|
<p><a href="http://validator.w3.org/check/referer">Validate</a>
|
185
|
-
<p>Generated by <a href="
|
160
|
+
<p>Generated by <a href="https://rdoc.github.io/rdoc">RDoc</a> 5.1.0.
|
186
161
|
<p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
|
187
162
|
</footer>
|
188
163
|
|
data/doc/AbsorbApi/Course.html
CHANGED
@@ -8,6 +8,7 @@
|
|
8
8
|
|
9
9
|
<script type="text/javascript">
|
10
10
|
var rdoc_rel_prefix = "../";
|
11
|
+
var index_rel_prefix = "../";
|
11
12
|
</script>
|
12
13
|
|
13
14
|
<script src="../js/jquery.js"></script>
|
@@ -58,34 +59,13 @@
|
|
58
59
|
<h3>Parent</h3>
|
59
60
|
|
60
61
|
|
61
|
-
<p class="link"
|
62
|
+
<p class="link">Record
|
62
63
|
|
63
64
|
</div>
|
64
65
|
|
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="Relations.html">AbsorbApi::Relations</a>
|
72
|
-
|
73
|
-
|
74
|
-
</ul>
|
75
|
-
</div>
|
76
|
-
|
77
66
|
|
78
|
-
<!-- Method Quickref -->
|
79
|
-
<div id="method-list-section" class="nav-section">
|
80
|
-
<h3>Methods</h3>
|
81
|
-
|
82
|
-
<ul class="link-list" role="directory">
|
83
67
|
|
84
|
-
<li ><a href="#method-c-enrollments_from_collection">::enrollments_from_collection</a>
|
85
68
|
|
86
|
-
</ul>
|
87
|
-
</div>
|
88
|
-
|
89
69
|
</div>
|
90
70
|
</nav>
|
91
71
|
|
@@ -470,61 +450,13 @@
|
|
470
450
|
|
471
451
|
|
472
452
|
|
473
|
-
<section id="public-class-5Buntitled-5D-method-details" class="method-section">
|
474
|
-
<header>
|
475
|
-
<h3>Public Class Methods</h3>
|
476
|
-
</header>
|
477
|
-
|
478
|
-
|
479
|
-
<div id="method-c-enrollments_from_collection" class="method-detail ">
|
480
|
-
|
481
|
-
<div class="method-heading">
|
482
|
-
<span class="method-name">enrollments_from_collection</span><span
|
483
|
-
class="method-args">(courses, **conditions)</span>
|
484
|
-
|
485
|
-
<span class="method-click-advice">click to toggle source</span>
|
486
|
-
|
487
|
-
</div>
|
488
|
-
|
489
|
-
|
490
|
-
<div class="method-description">
|
491
|
-
|
492
|
-
<p>gets all associated enrollments given a collection of courses all calls are
|
493
|
-
called in parallel</p>
|
494
|
-
|
495
|
-
|
496
|
-
|
497
|
-
|
498
|
-
<div class="method-source-code" id="enrollments_from_collection-source">
|
499
|
-
<pre><span class="ruby-comment"># File lib/absorb_api/course.rb, line 16</span>
|
500
|
-
<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>, <span class="ruby-operator">**</span><span class="ruby-identifier">conditions</span>)
|
501
|
-
<span class="ruby-identifier">enrollments</span> = []
|
502
|
-
<span class="ruby-constant">AbsorbApi</span>.<span class="ruby-identifier">api</span>.<span class="ruby-identifier">in_parallel</span> <span class="ruby-keyword">do</span>
|
503
|
-
<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>
|
504
|
-
<span class="ruby-identifier">enrollments</span> <span class="ruby-operator"><<</span> <span class="ruby-constant">AbsorbApi</span>.<span class="ruby-identifier">api</span>.<span class="ruby-identifier">get</span>(<span class="ruby-node">"courses/#{course.id}/enrollments"</span>, <span class="ruby-identifier">conditions</span>)
|
505
|
-
<span class="ruby-keyword">end</span>
|
506
|
-
<span class="ruby-keyword">end</span>
|
507
|
-
<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>
|
508
|
-
<span class="ruby-keyword">end</span></pre>
|
509
|
-
</div>
|
510
|
-
|
511
|
-
</div>
|
512
|
-
|
513
|
-
|
514
|
-
|
515
|
-
|
516
|
-
</div>
|
517
|
-
|
518
|
-
|
519
|
-
</section>
|
520
|
-
|
521
453
|
</section>
|
522
454
|
</main>
|
523
455
|
|
524
456
|
|
525
457
|
<footer id="validator-badges" role="contentinfo">
|
526
458
|
<p><a href="http://validator.w3.org/check/referer">Validate</a>
|
527
|
-
<p>Generated by <a href="
|
459
|
+
<p>Generated by <a href="https://rdoc.github.io/rdoc">RDoc</a> 5.1.0.
|
528
460
|
<p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
|
529
461
|
</footer>
|
530
462
|
|