contentful 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.gitignore +1 -0
- data/ChangeLog.md +6 -0
- data/Gemfile +5 -0
- data/README.md +1 -0
- data/contentful.gemspec +1 -1
- data/lib/contentful/array.rb +1 -2
- data/lib/contentful/asset.rb +3 -3
- data/lib/contentful/client.rb +15 -18
- data/lib/contentful/content_type.rb +1 -1
- data/lib/contentful/dynamic_entry.rb +6 -6
- data/lib/contentful/entry.rb +1 -1
- data/lib/contentful/error.rb +3 -3
- data/lib/contentful/field.rb +1 -1
- data/lib/contentful/file.rb +1 -1
- data/lib/contentful/link.rb +2 -2
- data/lib/contentful/locale.rb +1 -1
- data/lib/contentful/location.rb +1 -1
- data/lib/contentful/resource.rb +10 -11
- data/lib/contentful/resource_builder.rb +63 -39
- data/lib/contentful/space.rb +1 -1
- data/lib/contentful/support.rb +5 -3
- data/lib/contentful/version.rb +1 -1
- data/spec/fixtures/json_responses/includes.json +111 -0
- data/spec/fixtures/json_responses/link_array.json +43 -0
- data/spec/resource_building_spec.rb +20 -0
- data/spec/spec_helper.rb +5 -1
- metadata +138 -192
- data/.README.md.swp +0 -0
- data/do_request.sh +0 -5
- data/doc/Contentful.html +0 -131
- data/doc/Contentful/AccessDenied.html +0 -158
- data/doc/Contentful/Array.html +0 -346
- data/doc/Contentful/Asset.html +0 -315
- data/doc/Contentful/BadRequest.html +0 -158
- data/doc/Contentful/Client.html +0 -1407
- data/doc/Contentful/ContentType.html +0 -183
- data/doc/Contentful/DynamicEntry.html +0 -333
- data/doc/Contentful/Entry.html +0 -198
- data/doc/Contentful/Error.html +0 -413
- data/doc/Contentful/Field.html +0 -161
- data/doc/Contentful/File.html +0 -160
- data/doc/Contentful/Link.html +0 -275
- data/doc/Contentful/Locale.html +0 -161
- data/doc/Contentful/NotFound.html +0 -158
- data/doc/Contentful/Request.html +0 -669
- data/doc/Contentful/Resource.html +0 -606
- data/doc/Contentful/Resource/AssetFields.html +0 -413
- data/doc/Contentful/Resource/AssetFields/ClassMethods.html +0 -174
- data/doc/Contentful/Resource/ClassMethods.html +0 -271
- data/doc/Contentful/Resource/Fields.html +0 -398
- data/doc/Contentful/Resource/Fields/ClassMethods.html +0 -187
- data/doc/Contentful/Resource/SystemProperties.html +0 -444
- data/doc/Contentful/Resource/SystemProperties/ClassMethods.html +0 -174
- data/doc/Contentful/ResourceBuilder.html +0 -1400
- data/doc/Contentful/Response.html +0 -546
- data/doc/Contentful/ServerError.html +0 -158
- data/doc/Contentful/Space.html +0 -183
- data/doc/Contentful/Support.html +0 -198
- data/doc/Contentful/Unauthorized.html +0 -158
- data/doc/Contentful/UnparsableJson.html +0 -158
- data/doc/Contentful/UnparsableResource.html +0 -158
- data/doc/_index.html +0 -410
- data/doc/class_list.html +0 -54
- data/doc/css/common.css +0 -1
- data/doc/css/full_list.css +0 -57
- data/doc/css/style.css +0 -338
- data/doc/file.README.html +0 -214
- data/doc/file_list.html +0 -56
- data/doc/frames.html +0 -26
- data/doc/index.html +0 -214
- data/doc/js/app.js +0 -219
- data/doc/js/full_list.js +0 -178
- data/doc/js/jquery.js +0 -4
- data/doc/method_list.html +0 -533
- data/doc/top-level-namespace.html +0 -112
@@ -1,606 +0,0 @@
|
|
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
|
-
Module: Contentful::Resource
|
8
|
-
|
9
|
-
— Documentation by YARD 0.8.7.3
|
10
|
-
|
11
|
-
</title>
|
12
|
-
|
13
|
-
<link rel="stylesheet" href="../css/style.css" type="text/css" charset="utf-8" />
|
14
|
-
|
15
|
-
<link rel="stylesheet" href="../css/common.css" type="text/css" charset="utf-8" />
|
16
|
-
|
17
|
-
<script type="text/javascript" charset="utf-8">
|
18
|
-
hasFrames = window.top.frames.main ? true : false;
|
19
|
-
relpath = '../';
|
20
|
-
framesUrl = "../frames.html#!" + escape(window.location.href);
|
21
|
-
</script>
|
22
|
-
|
23
|
-
|
24
|
-
<script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
|
25
|
-
|
26
|
-
<script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
|
27
|
-
|
28
|
-
|
29
|
-
</head>
|
30
|
-
<body>
|
31
|
-
<div id="header">
|
32
|
-
<div id="menu">
|
33
|
-
|
34
|
-
<a href="../_index.html">Index (R)</a> »
|
35
|
-
<span class='title'><span class='object_link'><a href="../Contentful.html" title="Contentful (module)">Contentful</a></span></span>
|
36
|
-
»
|
37
|
-
<span class="title">Resource</span>
|
38
|
-
|
39
|
-
|
40
|
-
<div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
|
41
|
-
</div>
|
42
|
-
|
43
|
-
<div id="search">
|
44
|
-
|
45
|
-
<a class="full_list_link" id="class_list_link"
|
46
|
-
href="../class_list.html">
|
47
|
-
Class List
|
48
|
-
</a>
|
49
|
-
|
50
|
-
<a class="full_list_link" id="method_list_link"
|
51
|
-
href="../method_list.html">
|
52
|
-
Method List
|
53
|
-
</a>
|
54
|
-
|
55
|
-
<a class="full_list_link" id="file_list_link"
|
56
|
-
href="../file_list.html">
|
57
|
-
File List
|
58
|
-
</a>
|
59
|
-
|
60
|
-
</div>
|
61
|
-
<div class="clear"></div>
|
62
|
-
</div>
|
63
|
-
|
64
|
-
<iframe id="search_frame"></iframe>
|
65
|
-
|
66
|
-
<div id="content"><h1>Module: Contentful::Resource
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
</h1>
|
71
|
-
|
72
|
-
<dl class="box">
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
<dt class="r1">Included in:</dt>
|
81
|
-
<dd class="r1"><span class='object_link'><a href="Array.html" title="Contentful::Array (class)">Array</a></span>, <span class='object_link'><a href="Asset.html" title="Contentful::Asset (class)">Asset</a></span>, <span class='object_link'><a href="ContentType.html" title="Contentful::ContentType (class)">ContentType</a></span>, <span class='object_link'><a href="Entry.html" title="Contentful::Entry (class)">Entry</a></span>, <span class='object_link'><a href="Field.html" title="Contentful::Field (class)">Field</a></span>, <span class='object_link'><a href="File.html" title="Contentful::File (class)">File</a></span>, <span class='object_link'><a href="Link.html" title="Contentful::Link (class)">Link</a></span>, <span class='object_link'><a href="Locale.html" title="Contentful::Locale (class)">Locale</a></span>, <span class='object_link'><a href="Space.html" title="Contentful::Space (class)">Space</a></span></dd>
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
<dt class="r2 last">Defined in:</dt>
|
86
|
-
<dd class="r2 last">lib/contentful/resource.rb<span class="defines">,<br />
|
87
|
-
lib/contentful/resource/fields.rb,<br /> lib/contentful/resource/asset_fields.rb,<br /> lib/contentful/resource/system_properties.rb</span>
|
88
|
-
</dd>
|
89
|
-
|
90
|
-
</dl>
|
91
|
-
<div class="clear"></div>
|
92
|
-
|
93
|
-
<h2>Overview</h2><div class="docstring">
|
94
|
-
<div class="discussion">
|
95
|
-
|
96
|
-
<p>Include this module to tranform a class into a contentful resource. It</p>
|
97
|
-
|
98
|
-
|
99
|
-
</div>
|
100
|
-
</div>
|
101
|
-
<div class="tags">
|
102
|
-
|
103
|
-
|
104
|
-
</div><h2>Defined Under Namespace</h2>
|
105
|
-
<p class="children">
|
106
|
-
|
107
|
-
|
108
|
-
<strong class="modules">Modules:</strong> <span class='object_link'><a href="Resource/AssetFields.html" title="Contentful::Resource::AssetFields (module)">AssetFields</a></span>, <span class='object_link'><a href="Resource/ClassMethods.html" title="Contentful::Resource::ClassMethods (module)">ClassMethods</a></span>, <span class='object_link'><a href="Resource/Fields.html" title="Contentful::Resource::Fields (module)">Fields</a></span>, <span class='object_link'><a href="Resource/SystemProperties.html" title="Contentful::Resource::SystemProperties (module)">SystemProperties</a></span>
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
</p>
|
114
|
-
|
115
|
-
<h2>Constant Summary</h2>
|
116
|
-
|
117
|
-
<dl class="constants">
|
118
|
-
|
119
|
-
<dt id="COERCIONS-constant" class="">COERCIONS =
|
120
|
-
|
121
|
-
</dt>
|
122
|
-
<dd><pre class="code"><span class='lbrace'>{</span>
|
123
|
-
<span class='label'>string:</span> <span class='tlambda'>-></span><span class='lparen'>(</span><span class='id identifier rubyid_v'>v</span><span class='rparen'>)</span><span class='tlambeg'>{</span> <span class='id identifier rubyid_v'>v</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span> <span class='rbrace'>}</span><span class='comma'>,</span>
|
124
|
-
<span class='label'>integer:</span> <span class='tlambda'>-></span><span class='lparen'>(</span><span class='id identifier rubyid_v'>v</span><span class='rparen'>)</span><span class='tlambeg'>{</span> <span class='id identifier rubyid_v'>v</span><span class='period'>.</span><span class='id identifier rubyid_to_i'>to_i</span> <span class='rbrace'>}</span><span class='comma'>,</span>
|
125
|
-
<span class='label'>boolean:</span> <span class='tlambda'>-></span><span class='lparen'>(</span><span class='id identifier rubyid_v'>v</span><span class='rparen'>)</span><span class='tlambeg'>{</span> <span class='op'>!</span><span class='op'>!</span><span class='id identifier rubyid_v'>v</span> <span class='rbrace'>}</span><span class='comma'>,</span>
|
126
|
-
<span class='label'>date:</span> <span class='tlambda'>-></span><span class='lparen'>(</span><span class='id identifier rubyid_v'>v</span><span class='rparen'>)</span><span class='tlambeg'>{</span> <span class='const'>DateTime</span><span class='period'>.</span><span class='id identifier rubyid_parse'>parse</span><span class='lparen'>(</span><span class='id identifier rubyid_v'>v</span><span class='rparen'>)</span> <span class='rbrace'>}</span><span class='comma'>,</span>
|
127
|
-
<span class='rbrace'>}</span></pre></dd>
|
128
|
-
|
129
|
-
</dl>
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
<h2>Instance Attribute Summary <small>(<a href="#" class="summary_toggle">collapse</a>)</small></h2>
|
136
|
-
<ul class="summary">
|
137
|
-
|
138
|
-
<li class="public ">
|
139
|
-
<span class="summary_signature">
|
140
|
-
|
141
|
-
<a href="#client-instance_method" title="#client (instance method)">- (Object) <strong>client</strong> </a>
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
</span>
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
<span class="note title readonly">readonly</span>
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
<span class="summary_desc"><div class='inline'>
|
161
|
-
<p>Returns the value of attribute client.</p>
|
162
|
-
</div></span>
|
163
|
-
|
164
|
-
</li>
|
165
|
-
|
166
|
-
|
167
|
-
<li class="public ">
|
168
|
-
<span class="summary_signature">
|
169
|
-
|
170
|
-
<a href="#properties-instance_method" title="#properties (instance method)">- (Object) <strong>properties</strong> </a>
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
</span>
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
<span class="note title readonly">readonly</span>
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
<span class="summary_desc"><div class='inline'>
|
190
|
-
<p>Returns the value of attribute properties.</p>
|
191
|
-
</div></span>
|
192
|
-
|
193
|
-
</li>
|
194
|
-
|
195
|
-
|
196
|
-
</ul>
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
<h2>
|
203
|
-
Instance Method Summary
|
204
|
-
<small>(<a href="#" class="summary_toggle">collapse</a>)</small>
|
205
|
-
</h2>
|
206
|
-
|
207
|
-
<ul class="summary">
|
208
|
-
|
209
|
-
<li class="public ">
|
210
|
-
<span class="summary_signature">
|
211
|
-
|
212
|
-
<a href="#array%3F-instance_method" title="#array? (instance method)">- (Boolean) <strong>array?</strong> </a>
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
</span>
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
<span class="summary_desc"><div class='inline'></div></span>
|
227
|
-
|
228
|
-
</li>
|
229
|
-
|
230
|
-
|
231
|
-
<li class="public ">
|
232
|
-
<span class="summary_signature">
|
233
|
-
|
234
|
-
<a href="#fields-instance_method" title="#fields (instance method)">- (Object) <strong>fields</strong> </a>
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
</span>
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
|
245
|
-
|
246
|
-
|
247
|
-
|
248
|
-
<span class="summary_desc"><div class='inline'></div></span>
|
249
|
-
|
250
|
-
</li>
|
251
|
-
|
252
|
-
|
253
|
-
<li class="public ">
|
254
|
-
<span class="summary_signature">
|
255
|
-
|
256
|
-
<a href="#initialize-instance_method" title="#initialize (instance method)">- (Object) <strong>initialize</strong>(object, client = nil) </a>
|
257
|
-
|
258
|
-
|
259
|
-
|
260
|
-
</span>
|
261
|
-
|
262
|
-
|
263
|
-
|
264
|
-
|
265
|
-
|
266
|
-
|
267
|
-
|
268
|
-
|
269
|
-
|
270
|
-
<span class="summary_desc"><div class='inline'></div></span>
|
271
|
-
|
272
|
-
</li>
|
273
|
-
|
274
|
-
|
275
|
-
<li class="public ">
|
276
|
-
<span class="summary_signature">
|
277
|
-
|
278
|
-
<a href="#inspect-instance_method" title="#inspect (instance method)">- (Object) <strong>inspect</strong>(info = nil) </a>
|
279
|
-
|
280
|
-
|
281
|
-
|
282
|
-
</span>
|
283
|
-
|
284
|
-
|
285
|
-
|
286
|
-
|
287
|
-
|
288
|
-
|
289
|
-
|
290
|
-
|
291
|
-
|
292
|
-
<span class="summary_desc"><div class='inline'></div></span>
|
293
|
-
|
294
|
-
</li>
|
295
|
-
|
296
|
-
|
297
|
-
<li class="public ">
|
298
|
-
<span class="summary_signature">
|
299
|
-
|
300
|
-
<a href="#sys-instance_method" title="#sys (instance method)">- (Object) <strong>sys</strong> </a>
|
301
|
-
|
302
|
-
|
303
|
-
|
304
|
-
</span>
|
305
|
-
|
306
|
-
|
307
|
-
|
308
|
-
|
309
|
-
|
310
|
-
|
311
|
-
|
312
|
-
|
313
|
-
|
314
|
-
<span class="summary_desc"><div class='inline'></div></span>
|
315
|
-
|
316
|
-
</li>
|
317
|
-
|
318
|
-
|
319
|
-
</ul>
|
320
|
-
|
321
|
-
|
322
|
-
|
323
|
-
<div id="instance_attr_details" class="attr_details">
|
324
|
-
<h2>Instance Attribute Details</h2>
|
325
|
-
|
326
|
-
|
327
|
-
<span id=""></span>
|
328
|
-
<div class="method_details first">
|
329
|
-
<h3 class="signature first" id="client-instance_method">
|
330
|
-
|
331
|
-
- (<tt>Object</tt>) <strong>client</strong> <span class="extras">(readonly)</span>
|
332
|
-
|
333
|
-
|
334
|
-
|
335
|
-
|
336
|
-
|
337
|
-
</h3><div class="docstring">
|
338
|
-
<div class="discussion">
|
339
|
-
|
340
|
-
<p>Returns the value of attribute client</p>
|
341
|
-
|
342
|
-
|
343
|
-
</div>
|
344
|
-
</div>
|
345
|
-
<div class="tags">
|
346
|
-
|
347
|
-
|
348
|
-
</div><table class="source_code">
|
349
|
-
<tr>
|
350
|
-
<td>
|
351
|
-
<pre class="lines">
|
352
|
-
|
353
|
-
|
354
|
-
15
|
355
|
-
16
|
356
|
-
17</pre>
|
357
|
-
</td>
|
358
|
-
<td>
|
359
|
-
<pre class="code"><span class="info file"># File 'lib/contentful/resource.rb', line 15</span>
|
360
|
-
|
361
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_client'>client</span>
|
362
|
-
<span class='ivar'>@client</span>
|
363
|
-
<span class='kw'>end</span></pre>
|
364
|
-
</td>
|
365
|
-
</tr>
|
366
|
-
</table>
|
367
|
-
</div>
|
368
|
-
|
369
|
-
|
370
|
-
<span id=""></span>
|
371
|
-
<div class="method_details ">
|
372
|
-
<h3 class="signature " id="properties-instance_method">
|
373
|
-
|
374
|
-
- (<tt>Object</tt>) <strong>properties</strong> <span class="extras">(readonly)</span>
|
375
|
-
|
376
|
-
|
377
|
-
|
378
|
-
|
379
|
-
|
380
|
-
</h3><div class="docstring">
|
381
|
-
<div class="discussion">
|
382
|
-
|
383
|
-
<p>Returns the value of attribute properties</p>
|
384
|
-
|
385
|
-
|
386
|
-
</div>
|
387
|
-
</div>
|
388
|
-
<div class="tags">
|
389
|
-
|
390
|
-
|
391
|
-
</div><table class="source_code">
|
392
|
-
<tr>
|
393
|
-
<td>
|
394
|
-
<pre class="lines">
|
395
|
-
|
396
|
-
|
397
|
-
15
|
398
|
-
16
|
399
|
-
17</pre>
|
400
|
-
</td>
|
401
|
-
<td>
|
402
|
-
<pre class="code"><span class="info file"># File 'lib/contentful/resource.rb', line 15</span>
|
403
|
-
|
404
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_properties'>properties</span>
|
405
|
-
<span class='ivar'>@properties</span>
|
406
|
-
<span class='kw'>end</span></pre>
|
407
|
-
</td>
|
408
|
-
</tr>
|
409
|
-
</table>
|
410
|
-
</div>
|
411
|
-
|
412
|
-
</div>
|
413
|
-
|
414
|
-
|
415
|
-
<div id="instance_method_details" class="method_details_list">
|
416
|
-
<h2>Instance Method Details</h2>
|
417
|
-
|
418
|
-
|
419
|
-
<div class="method_details first">
|
420
|
-
<h3 class="signature first" id="array?-instance_method">
|
421
|
-
|
422
|
-
- (<tt>Boolean</tt>) <strong>array?</strong>
|
423
|
-
|
424
|
-
|
425
|
-
|
426
|
-
|
427
|
-
|
428
|
-
</h3><div class="docstring">
|
429
|
-
<div class="discussion">
|
430
|
-
|
431
|
-
|
432
|
-
</div>
|
433
|
-
</div>
|
434
|
-
<div class="tags">
|
435
|
-
|
436
|
-
<p class="tag_title">Returns:</p>
|
437
|
-
<ul class="return">
|
438
|
-
|
439
|
-
<li>
|
440
|
-
|
441
|
-
|
442
|
-
<span class='type'>(<tt>Boolean</tt>)</span>
|
443
|
-
|
444
|
-
|
445
|
-
|
446
|
-
</li>
|
447
|
-
|
448
|
-
</ul>
|
449
|
-
|
450
|
-
</div><table class="source_code">
|
451
|
-
<tr>
|
452
|
-
<td>
|
453
|
-
<pre class="lines">
|
454
|
-
|
455
|
-
|
456
|
-
27
|
457
|
-
28
|
458
|
-
29</pre>
|
459
|
-
</td>
|
460
|
-
<td>
|
461
|
-
<pre class="code"><span class="info file"># File 'lib/contentful/resource.rb', line 27</span>
|
462
|
-
|
463
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_array?'>array?</span>
|
464
|
-
<span class='kw'>false</span>
|
465
|
-
<span class='kw'>end</span></pre>
|
466
|
-
</td>
|
467
|
-
</tr>
|
468
|
-
</table>
|
469
|
-
</div>
|
470
|
-
|
471
|
-
<div class="method_details ">
|
472
|
-
<h3 class="signature " id="fields-instance_method">
|
473
|
-
|
474
|
-
- (<tt>Object</tt>) <strong>fields</strong>
|
475
|
-
|
476
|
-
|
477
|
-
|
478
|
-
|
479
|
-
|
480
|
-
</h3><table class="source_code">
|
481
|
-
<tr>
|
482
|
-
<td>
|
483
|
-
<pre class="lines">
|
484
|
-
|
485
|
-
|
486
|
-
35
|
487
|
-
36
|
488
|
-
37</pre>
|
489
|
-
</td>
|
490
|
-
<td>
|
491
|
-
<pre class="code"><span class="info file"># File 'lib/contentful/resource.rb', line 35</span>
|
492
|
-
|
493
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_fields'>fields</span>
|
494
|
-
<span class='kw'>nil</span>
|
495
|
-
<span class='kw'>end</span></pre>
|
496
|
-
</td>
|
497
|
-
</tr>
|
498
|
-
</table>
|
499
|
-
</div>
|
500
|
-
|
501
|
-
<div class="method_details ">
|
502
|
-
<h3 class="signature " id="initialize-instance_method">
|
503
|
-
|
504
|
-
- (<tt>Object</tt>) <strong>initialize</strong>(object, client = nil)
|
505
|
-
|
506
|
-
|
507
|
-
|
508
|
-
|
509
|
-
|
510
|
-
</h3><table class="source_code">
|
511
|
-
<tr>
|
512
|
-
<td>
|
513
|
-
<pre class="lines">
|
514
|
-
|
515
|
-
|
516
|
-
17
|
517
|
-
18
|
518
|
-
19
|
519
|
-
20</pre>
|
520
|
-
</td>
|
521
|
-
<td>
|
522
|
-
<pre class="code"><span class="info file"># File 'lib/contentful/resource.rb', line 17</span>
|
523
|
-
|
524
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_object'>object</span><span class='comma'>,</span> <span class='id identifier rubyid_client'>client</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='rparen'>)</span>
|
525
|
-
<span class='ivar'>@properties</span> <span class='op'>=</span> <span class='id identifier rubyid_extract_from_object'>extract_from_object</span> <span class='id identifier rubyid_object'>object</span><span class='comma'>,</span> <span class='symbol'>:property</span><span class='comma'>,</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_class'>class</span><span class='period'>.</span><span class='id identifier rubyid_property_coercions'>property_coercions</span><span class='period'>.</span><span class='id identifier rubyid_keys'>keys</span>
|
526
|
-
<span class='ivar'>@client</span> <span class='op'>=</span> <span class='id identifier rubyid_client'>client</span>
|
527
|
-
<span class='kw'>end</span></pre>
|
528
|
-
</td>
|
529
|
-
</tr>
|
530
|
-
</table>
|
531
|
-
</div>
|
532
|
-
|
533
|
-
<div class="method_details ">
|
534
|
-
<h3 class="signature " id="inspect-instance_method">
|
535
|
-
|
536
|
-
- (<tt>Object</tt>) <strong>inspect</strong>(info = nil)
|
537
|
-
|
538
|
-
|
539
|
-
|
540
|
-
|
541
|
-
|
542
|
-
</h3><table class="source_code">
|
543
|
-
<tr>
|
544
|
-
<td>
|
545
|
-
<pre class="lines">
|
546
|
-
|
547
|
-
|
548
|
-
22
|
549
|
-
23
|
550
|
-
24
|
551
|
-
25</pre>
|
552
|
-
</td>
|
553
|
-
<td>
|
554
|
-
<pre class="code"><span class="info file"># File 'lib/contentful/resource.rb', line 22</span>
|
555
|
-
|
556
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_inspect'>inspect</span><span class='lparen'>(</span><span class='id identifier rubyid_info'>info</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='rparen'>)</span>
|
557
|
-
<span class='id identifier rubyid_properties_info'>properties_info</span> <span class='op'>=</span> <span class='id identifier rubyid_properties'>properties</span><span class='period'>.</span><span class='id identifier rubyid_empty?'>empty?</span> <span class='op'>?</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_end'>"</span></span> <span class='op'>:</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'> @properties=</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_properties'>properties</span><span class='period'>.</span><span class='id identifier rubyid_inspect'>inspect</span><span class='rbrace'>}</span><span class='tstring_end'>"</span></span>
|
558
|
-
<span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>#<</span><span class='embexpr_beg'>#{</span><span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_class'>class</span><span class='rbrace'>}</span><span class='tstring_content'>:</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_properties_info'>properties_info</span><span class='rbrace'>}</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_info'>info</span><span class='rbrace'>}</span><span class='tstring_content'>></span><span class='tstring_end'>"</span></span>
|
559
|
-
<span class='kw'>end</span></pre>
|
560
|
-
</td>
|
561
|
-
</tr>
|
562
|
-
</table>
|
563
|
-
</div>
|
564
|
-
|
565
|
-
<div class="method_details ">
|
566
|
-
<h3 class="signature " id="sys-instance_method">
|
567
|
-
|
568
|
-
- (<tt>Object</tt>) <strong>sys</strong>
|
569
|
-
|
570
|
-
|
571
|
-
|
572
|
-
|
573
|
-
|
574
|
-
</h3><table class="source_code">
|
575
|
-
<tr>
|
576
|
-
<td>
|
577
|
-
<pre class="lines">
|
578
|
-
|
579
|
-
|
580
|
-
31
|
581
|
-
32
|
582
|
-
33</pre>
|
583
|
-
</td>
|
584
|
-
<td>
|
585
|
-
<pre class="code"><span class="info file"># File 'lib/contentful/resource.rb', line 31</span>
|
586
|
-
|
587
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_sys'>sys</span>
|
588
|
-
<span class='kw'>nil</span>
|
589
|
-
<span class='kw'>end</span></pre>
|
590
|
-
</td>
|
591
|
-
</tr>
|
592
|
-
</table>
|
593
|
-
</div>
|
594
|
-
|
595
|
-
</div>
|
596
|
-
|
597
|
-
</div>
|
598
|
-
|
599
|
-
<div id="footer">
|
600
|
-
Generated on Tue Mar 11 09:25:52 2014 by
|
601
|
-
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
602
|
-
0.8.7.3 (ruby-1.9.3).
|
603
|
-
</div>
|
604
|
-
|
605
|
-
</body>
|
606
|
-
</html>
|