contentful 2.1.1 → 2.1.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (115) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +6 -0
  3. data/Gemfile.lock +37 -46
  4. data/lib/contentful/array.rb +8 -1
  5. data/lib/contentful/entry.rb +9 -9
  6. data/lib/contentful/fields_resource.rb +9 -8
  7. data/lib/contentful/resource_builder.rb +1 -7
  8. data/lib/contentful/support.rb +22 -0
  9. data/lib/contentful/version.rb +1 -1
  10. data/spec/array_spec.rb +21 -0
  11. data/spec/fixtures/vcr_cassettes/array/nested_resources.yml +159 -0
  12. metadata +5 -106
  13. data/coverage/.last_run.json +0 -5
  14. data/coverage/.resultset.json +0 -1887
  15. data/coverage/.resultset.json.lock +0 -0
  16. data/coverage/assets/0.10.0/application.css +0 -799
  17. data/coverage/assets/0.10.0/application.js +0 -1707
  18. data/coverage/assets/0.10.0/colorbox/border.png +0 -0
  19. data/coverage/assets/0.10.0/colorbox/controls.png +0 -0
  20. data/coverage/assets/0.10.0/colorbox/loading.gif +0 -0
  21. data/coverage/assets/0.10.0/colorbox/loading_background.png +0 -0
  22. data/coverage/assets/0.10.0/favicon_green.png +0 -0
  23. data/coverage/assets/0.10.0/favicon_red.png +0 -0
  24. data/coverage/assets/0.10.0/favicon_yellow.png +0 -0
  25. data/coverage/assets/0.10.0/loading.gif +0 -0
  26. data/coverage/assets/0.10.0/magnify.png +0 -0
  27. data/coverage/assets/0.10.0/smoothness/images/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
  28. data/coverage/assets/0.10.0/smoothness/images/ui-bg_flat_75_ffffff_40x100.png +0 -0
  29. data/coverage/assets/0.10.0/smoothness/images/ui-bg_glass_55_fbf9ee_1x400.png +0 -0
  30. data/coverage/assets/0.10.0/smoothness/images/ui-bg_glass_65_ffffff_1x400.png +0 -0
  31. data/coverage/assets/0.10.0/smoothness/images/ui-bg_glass_75_dadada_1x400.png +0 -0
  32. data/coverage/assets/0.10.0/smoothness/images/ui-bg_glass_75_e6e6e6_1x400.png +0 -0
  33. data/coverage/assets/0.10.0/smoothness/images/ui-bg_glass_95_fef1ec_1x400.png +0 -0
  34. data/coverage/assets/0.10.0/smoothness/images/ui-bg_highlight-soft_75_cccccc_1x100.png +0 -0
  35. data/coverage/assets/0.10.0/smoothness/images/ui-icons_222222_256x240.png +0 -0
  36. data/coverage/assets/0.10.0/smoothness/images/ui-icons_2e83ff_256x240.png +0 -0
  37. data/coverage/assets/0.10.0/smoothness/images/ui-icons_454545_256x240.png +0 -0
  38. data/coverage/assets/0.10.0/smoothness/images/ui-icons_888888_256x240.png +0 -0
  39. data/coverage/assets/0.10.0/smoothness/images/ui-icons_cd0a0a_256x240.png +0 -0
  40. data/coverage/index.html +0 -11816
  41. data/doc/Contentful.html +0 -153
  42. data/doc/Contentful/AccessDenied.html +0 -161
  43. data/doc/Contentful/Array.html +0 -743
  44. data/doc/Contentful/ArrayCoercion.html +0 -244
  45. data/doc/Contentful/ArrayLike.html +0 -627
  46. data/doc/Contentful/Asset.html +0 -475
  47. data/doc/Contentful/BadRequest.html +0 -161
  48. data/doc/Contentful/BaseCoercion.html +0 -447
  49. data/doc/Contentful/BaseResource.html +0 -599
  50. data/doc/Contentful/BooleanCoercion.html +0 -244
  51. data/doc/Contentful/Client.html +0 -1606
  52. data/doc/Contentful/Constants.html +0 -636
  53. data/doc/Contentful/ContentType.html +0 -614
  54. data/doc/Contentful/ContentTypeCache.html +0 -430
  55. data/doc/Contentful/DateCoercion.html +0 -240
  56. data/doc/Contentful/DeletedAsset.html +0 -159
  57. data/doc/Contentful/DeletedEntry.html +0 -159
  58. data/doc/Contentful/DynamicEntry.html +0 -214
  59. data/doc/Contentful/Entry.html +0 -273
  60. data/doc/Contentful/Error.html +0 -424
  61. data/doc/Contentful/Field.html +0 -929
  62. data/doc/Contentful/FieldsResource.html +0 -501
  63. data/doc/Contentful/File.html +0 -520
  64. data/doc/Contentful/FloatCoercion.html +0 -240
  65. data/doc/Contentful/IntegerCoercion.html +0 -240
  66. data/doc/Contentful/Link.html +0 -251
  67. data/doc/Contentful/LinkCoercion.html +0 -160
  68. data/doc/Contentful/Locale.html +0 -447
  69. data/doc/Contentful/Location.html +0 -385
  70. data/doc/Contentful/LocationCoercion.html +0 -240
  71. data/doc/Contentful/NotFound.html +0 -161
  72. data/doc/Contentful/ObjectCoercion.html +0 -240
  73. data/doc/Contentful/RateLimitExceeded.html +0 -161
  74. data/doc/Contentful/Request.html +0 -889
  75. data/doc/Contentful/Resource.html +0 -117
  76. data/doc/Contentful/Resource/ArrayLike.html +0 -627
  77. data/doc/Contentful/Resource/AssetFields.html +0 -246
  78. data/doc/Contentful/Resource/AssetFields/ClassMethods.html +0 -174
  79. data/doc/Contentful/Resource/ClassMethods.html +0 -378
  80. data/doc/Contentful/Resource/CustomResource.html +0 -119
  81. data/doc/Contentful/Resource/Fields.html +0 -288
  82. data/doc/Contentful/Resource/Fields/ClassMethods.html +0 -187
  83. data/doc/Contentful/Resource/LocalizedFields.html +0 -305
  84. data/doc/Contentful/Resource/SystemProperties.html +0 -205
  85. data/doc/Contentful/Resource/SystemProperties/ClassMethods.html +0 -174
  86. data/doc/Contentful/ResourceBuilder.html +0 -969
  87. data/doc/Contentful/Response.html +0 -641
  88. data/doc/Contentful/ServerError.html +0 -161
  89. data/doc/Contentful/ServiceUnavailable.html +0 -161
  90. data/doc/Contentful/Space.html +0 -395
  91. data/doc/Contentful/StringCoercion.html +0 -244
  92. data/doc/Contentful/Support.html +0 -550
  93. data/doc/Contentful/SymbolCoercion.html +0 -171
  94. data/doc/Contentful/Sync.html +0 -655
  95. data/doc/Contentful/SyncPage.html +0 -801
  96. data/doc/Contentful/TextCoercion.html +0 -171
  97. data/doc/Contentful/Unauthorized.html +0 -161
  98. data/doc/Contentful/UnparsableJson.html +0 -161
  99. data/doc/Contentful/UnparsableResource.html +0 -137
  100. data/doc/_index.html +0 -537
  101. data/doc/class_list.html +0 -51
  102. data/doc/css/common.css +0 -1
  103. data/doc/css/full_list.css +0 -58
  104. data/doc/css/style.css +0 -481
  105. data/doc/file.CHANGELOG.html +0 -506
  106. data/doc/file.LICENSE.html +0 -72
  107. data/doc/file.README.html +0 -565
  108. data/doc/file_list.html +0 -66
  109. data/doc/frames.html +0 -17
  110. data/doc/index.html +0 -565
  111. data/doc/js/app.js +0 -243
  112. data/doc/js/full_list.js +0 -216
  113. data/doc/js/jquery.js +0 -4
  114. data/doc/method_list.html +0 -1115
  115. data/doc/top-level-namespace.html +0 -112
@@ -1,174 +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::SystemProperties::ClassMethods
8
-
9
- &mdash; Documentation by YARD 0.8.7.6
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#!Contentful/Resource/SystemProperties/ClassMethods.html";
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 (C)</a> &raquo;
35
- <span class='title'><span class='object_link'><a href="../../../Contentful.html" title="Contentful (module)">Contentful</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../../Resource.html" title="Contentful::Resource (module)">Resource</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../SystemProperties.html" title="Contentful::Resource::SystemProperties (module)">SystemProperties</a></span></span>
36
- &raquo;
37
- <span class="title">ClassMethods</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::SystemProperties::ClassMethods
67
-
68
-
69
-
70
- </h1>
71
-
72
- <dl class="box">
73
-
74
-
75
-
76
-
77
-
78
-
79
-
80
-
81
- <dt class="r1 last">Defined in:</dt>
82
- <dd class="r1 last">lib/contentful/resource/system_properties.rb</dd>
83
-
84
- </dl>
85
- <div class="clear"></div>
86
-
87
-
88
-
89
-
90
-
91
-
92
-
93
-
94
-
95
- <h2>
96
- Instance Method Summary
97
- <small>(<a href="#" class="summary_toggle">collapse</a>)</small>
98
- </h2>
99
-
100
- <ul class="summary">
101
-
102
- <li class="public ">
103
- <span class="summary_signature">
104
-
105
- <a href="#sys_coercions-instance_method" title="#sys_coercions (instance method)">- (Object) <strong>sys_coercions</strong> </a>
106
-
107
-
108
-
109
- </span>
110
-
111
-
112
-
113
-
114
-
115
-
116
-
117
-
118
-
119
- <span class="summary_desc"><div class='inline'></div></span>
120
-
121
- </li>
122
-
123
-
124
- </ul>
125
-
126
-
127
-
128
-
129
- <div id="instance_method_details" class="method_details_list">
130
- <h2>Instance Method Details</h2>
131
-
132
-
133
- <div class="method_details first">
134
- <h3 class="signature first" id="sys_coercions-instance_method">
135
-
136
- - (<tt>Object</tt>) <strong>sys_coercions</strong>
137
-
138
-
139
-
140
-
141
-
142
- </h3><table class="source_code">
143
- <tr>
144
- <td>
145
- <pre class="lines">
146
-
147
-
148
- 32
149
- 33
150
- 34</pre>
151
- </td>
152
- <td>
153
- <pre class="code"><span class="info file"># File 'lib/contentful/resource/system_properties.rb', line 32</span>
154
-
155
- <span class='kw'>def</span> <span class='id identifier rubyid_sys_coercions'>sys_coercions</span>
156
- <span class='const'>SYS_COERCIONS</span>
157
- <span class='kw'>end</span></pre>
158
- </td>
159
- </tr>
160
- </table>
161
- </div>
162
-
163
- </div>
164
-
165
- </div>
166
-
167
- <div id="footer">
168
- Generated on Tue Feb 2 13:14:25 2016 by
169
- <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
170
- 0.8.7.6 (ruby-2.2.3).
171
- </div>
172
-
173
- </body>
174
- </html>
@@ -1,969 +0,0 @@
1
- <!DOCTYPE html>
2
- <html>
3
- <head>
4
- <meta charset="utf-8">
5
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
- <title>
7
- Class: Contentful::ResourceBuilder
8
-
9
- &mdash; Documentation by YARD 0.9.5
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
- pathId = "Contentful::ResourceBuilder";
19
- relpath = '../';
20
- </script>
21
-
22
-
23
- <script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
24
-
25
- <script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
26
-
27
-
28
- </head>
29
- <body>
30
- <div class="nav_wrap">
31
- <iframe id="nav" src="../class_list.html"></iframe>
32
- <div id="resizer"></div>
33
- </div>
34
-
35
- <div id="main" tabindex="-1">
36
- <div id="header">
37
- <div id="menu">
38
-
39
- <a href="../_index.html">Index (R)</a> &raquo;
40
- <span class='title'><span class='object_link'><a href="../Contentful.html" title="Contentful (module)">Contentful</a></span></span>
41
- &raquo;
42
- <span class="title">ResourceBuilder</span>
43
-
44
- </div>
45
-
46
- <div id="search">
47
-
48
- <a class="full_list_link" id="class_list_link"
49
- href="../class_list.html">
50
-
51
- <svg width="24" height="24">
52
- <rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
53
- <rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
54
- <rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
55
- </svg>
56
- </a>
57
-
58
- </div>
59
- <div class="clear"></div>
60
- </div>
61
-
62
- <iframe id="search_frame" src="../class_list.html"></iframe>
63
-
64
- <div id="content"><h1>Class: Contentful::ResourceBuilder
65
-
66
-
67
-
68
- </h1>
69
- <div class="box_info">
70
-
71
- <dl>
72
- <dt>Inherits:</dt>
73
- <dd>
74
- <span class="inheritName">Object</span>
75
-
76
- <ul class="fullTree">
77
- <li>Object</li>
78
-
79
- <li class="next">Contentful::ResourceBuilder</li>
80
-
81
- </ul>
82
- <a href="#" class="inheritanceTree">show all</a>
83
-
84
- </dd>
85
- </dl>
86
-
87
-
88
-
89
-
90
-
91
-
92
-
93
-
94
-
95
-
96
-
97
- <dl>
98
- <dt>Defined in:</dt>
99
- <dd>lib/contentful/resource_builder.rb</dd>
100
- </dl>
101
-
102
- </div>
103
-
104
- <h2>Overview</h2><div class="docstring">
105
- <div class="discussion">
106
-
107
- <p>Transforms a Contentful::Response into a Contentful::Resource or a
108
- Contentful::Error See example/resource_mapping.rb for advanced usage</p>
109
-
110
-
111
- </div>
112
- </div>
113
- <div class="tags">
114
-
115
-
116
- </div>
117
- <h2>Constant Summary</h2>
118
- <dl class="constants">
119
-
120
- <dt id="DEFAULT_RESOURCE_MAPPING-constant" class="">DEFAULT_RESOURCE_MAPPING =
121
- <div class="docstring">
122
- <div class="discussion">
123
-
124
- <p>Default Resource Mapping</p>
125
-
126
-
127
- </div>
128
- </div>
129
- <div class="tags">
130
-
131
-
132
- <p class="tag_title">See Also:</p>
133
- <ul class="see">
134
-
135
- <li>README for more information on Resource Mapping</li>
136
-
137
- </ul>
138
-
139
- </div>
140
- </dt>
141
- <dd><pre class="code"><span class='lbrace'>{</span>
142
- <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>Space</span><span class='tstring_end'>&#39;</span></span> <span class='op'>=&gt;</span> <span class='const'>Space</span><span class='comma'>,</span>
143
- <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>ContentType</span><span class='tstring_end'>&#39;</span></span> <span class='op'>=&gt;</span> <span class='const'>ContentType</span><span class='comma'>,</span>
144
- <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>Entry</span><span class='tstring_end'>&#39;</span></span> <span class='op'>=&gt;</span> <span class='const'>Entry</span><span class='comma'>,</span>
145
- <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>Asset</span><span class='tstring_end'>&#39;</span></span> <span class='op'>=&gt;</span> <span class='const'>Asset</span><span class='comma'>,</span>
146
- <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>Array</span><span class='tstring_end'>&#39;</span></span> <span class='op'>=&gt;</span> <span class='const'>Array</span><span class='comma'>,</span>
147
- <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>Link</span><span class='tstring_end'>&#39;</span></span> <span class='op'>=&gt;</span> <span class='const'>Link</span><span class='comma'>,</span>
148
- <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>DeletedEntry</span><span class='tstring_end'>&#39;</span></span> <span class='op'>=&gt;</span> <span class='const'>DeletedEntry</span><span class='comma'>,</span>
149
- <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>DeletedAsset</span><span class='tstring_end'>&#39;</span></span> <span class='op'>=&gt;</span> <span class='const'>DeletedAsset</span>
150
- <span class='rbrace'>}</span></pre></dd>
151
-
152
- <dt id="DEFAULT_ENTRY_MAPPING-constant" class="">DEFAULT_ENTRY_MAPPING =
153
- <div class="docstring">
154
- <div class="discussion">
155
-
156
- <p>Default Entry Mapping</p>
157
-
158
-
159
- </div>
160
- </div>
161
- <div class="tags">
162
-
163
-
164
- <p class="tag_title">See Also:</p>
165
- <ul class="see">
166
-
167
- <li>README for more information on Entry Mapping</li>
168
-
169
- </ul>
170
-
171
- </div>
172
- </dt>
173
- <dd><pre class="code"><span class='lbrace'>{</span><span class='rbrace'>}</span></pre></dd>
174
-
175
- </dl>
176
-
177
-
178
-
179
-
180
- <h2>Instance Attribute Summary <small><a href="#" class="summary_toggle">collapse</a></small></h2>
181
- <ul class="summary">
182
-
183
- <li class="public ">
184
- <span class="summary_signature">
185
-
186
- <a href="#default_locale-instance_method" title="#default_locale (instance method)">#<strong>default_locale</strong> &#x21d2; Object </a>
187
-
188
-
189
-
190
- </span>
191
-
192
-
193
-
194
-
195
- <span class="note title readonly">readonly</span>
196
-
197
-
198
-
199
-
200
-
201
-
202
-
203
-
204
-
205
- <span class="summary_desc"><div class='inline'>
206
- <p>Returns the value of attribute default_locale.</p>
207
- </div></span>
208
-
209
- </li>
210
-
211
-
212
- <li class="public ">
213
- <span class="summary_signature">
214
-
215
- <a href="#depth-instance_method" title="#depth (instance method)">#<strong>depth</strong> &#x21d2; Object </a>
216
-
217
-
218
-
219
- </span>
220
-
221
-
222
-
223
-
224
- <span class="note title readonly">readonly</span>
225
-
226
-
227
-
228
-
229
-
230
-
231
-
232
-
233
-
234
- <span class="summary_desc"><div class='inline'>
235
- <p>Returns the value of attribute depth.</p>
236
- </div></span>
237
-
238
- </li>
239
-
240
-
241
- <li class="public ">
242
- <span class="summary_signature">
243
-
244
- <a href="#endpoint-instance_method" title="#endpoint (instance method)">#<strong>endpoint</strong> &#x21d2; Object </a>
245
-
246
-
247
-
248
- </span>
249
-
250
-
251
-
252
-
253
- <span class="note title readonly">readonly</span>
254
-
255
-
256
-
257
-
258
-
259
-
260
-
261
-
262
-
263
- <span class="summary_desc"><div class='inline'>
264
- <p>Returns the value of attribute endpoint.</p>
265
- </div></span>
266
-
267
- </li>
268
-
269
-
270
- <li class="public ">
271
- <span class="summary_signature">
272
-
273
- <a href="#entry_mapping-instance_method" title="#entry_mapping (instance method)">#<strong>entry_mapping</strong> &#x21d2; Object </a>
274
-
275
-
276
-
277
- </span>
278
-
279
-
280
-
281
-
282
- <span class="note title readonly">readonly</span>
283
-
284
-
285
-
286
-
287
-
288
-
289
-
290
-
291
-
292
- <span class="summary_desc"><div class='inline'>
293
- <p>Returns the value of attribute entry_mapping.</p>
294
- </div></span>
295
-
296
- </li>
297
-
298
-
299
- <li class="public ">
300
- <span class="summary_signature">
301
-
302
- <a href="#json-instance_method" title="#json (instance method)">#<strong>json</strong> &#x21d2; Object </a>
303
-
304
-
305
-
306
- </span>
307
-
308
-
309
-
310
-
311
- <span class="note title readonly">readonly</span>
312
-
313
-
314
-
315
-
316
-
317
-
318
-
319
-
320
-
321
- <span class="summary_desc"><div class='inline'>
322
- <p>Returns the value of attribute json.</p>
323
- </div></span>
324
-
325
- </li>
326
-
327
-
328
- <li class="public ">
329
- <span class="summary_signature">
330
-
331
- <a href="#localized-instance_method" title="#localized (instance method)">#<strong>localized</strong> &#x21d2; Object </a>
332
-
333
-
334
-
335
- </span>
336
-
337
-
338
-
339
-
340
- <span class="note title readonly">readonly</span>
341
-
342
-
343
-
344
-
345
-
346
-
347
-
348
-
349
-
350
- <span class="summary_desc"><div class='inline'>
351
- <p>Returns the value of attribute localized.</p>
352
- </div></span>
353
-
354
- </li>
355
-
356
-
357
- <li class="public ">
358
- <span class="summary_signature">
359
-
360
- <a href="#resource-instance_method" title="#resource (instance method)">#<strong>resource</strong> &#x21d2; Object </a>
361
-
362
-
363
-
364
- </span>
365
-
366
-
367
-
368
-
369
- <span class="note title readonly">readonly</span>
370
-
371
-
372
-
373
-
374
-
375
-
376
-
377
-
378
-
379
- <span class="summary_desc"><div class='inline'>
380
- <p>Returns the value of attribute resource.</p>
381
- </div></span>
382
-
383
- </li>
384
-
385
-
386
- <li class="public ">
387
- <span class="summary_signature">
388
-
389
- <a href="#resource_mapping-instance_method" title="#resource_mapping (instance method)">#<strong>resource_mapping</strong> &#x21d2; Object </a>
390
-
391
-
392
-
393
- </span>
394
-
395
-
396
-
397
-
398
- <span class="note title readonly">readonly</span>
399
-
400
-
401
-
402
-
403
-
404
-
405
-
406
-
407
-
408
- <span class="summary_desc"><div class='inline'>
409
- <p>Returns the value of attribute resource_mapping.</p>
410
- </div></span>
411
-
412
- </li>
413
-
414
-
415
- </ul>
416
-
417
-
418
-
419
-
420
-
421
- <h2>
422
- Instance Method Summary
423
- <small><a href="#" class="summary_toggle">collapse</a></small>
424
- </h2>
425
-
426
- <ul class="summary">
427
-
428
- <li class="public ">
429
- <span class="summary_signature">
430
-
431
- <a href="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong>(json, configuration = {}, localized = false, depth = 0, endpoint = nil) &#x21d2; ResourceBuilder </a>
432
-
433
-
434
-
435
- </span>
436
-
437
-
438
- <span class="note title constructor">constructor</span>
439
-
440
-
441
-
442
-
443
-
444
-
445
-
446
-
447
- <span class="summary_desc"><div class='inline'>
448
- <p>A new instance of ResourceBuilder.</p>
449
- </div></span>
450
-
451
- </li>
452
-
453
-
454
- <li class="public ">
455
- <span class="summary_signature">
456
-
457
- <a href="#run-instance_method" title="#run (instance method)">#<strong>run</strong> &#x21d2; Contentful::Resource, Contentful::Error </a>
458
-
459
-
460
-
461
- </span>
462
-
463
-
464
-
465
-
466
-
467
-
468
-
469
-
470
-
471
- <span class="summary_desc"><div class='inline'>
472
- <p>Starts the parsing process.</p>
473
- </div></span>
474
-
475
- </li>
476
-
477
-
478
- </ul>
479
-
480
-
481
- <div id="constructor_details" class="method_details_list">
482
- <h2>Constructor Details</h2>
483
-
484
- <div class="method_details first">
485
- <h3 class="signature first" id="initialize-instance_method">
486
-
487
- #<strong>initialize</strong>(json, configuration = {}, localized = false, depth = 0, endpoint = nil) &#x21d2; <tt><span class='object_link'><a href="" title="Contentful::ResourceBuilder (class)">ResourceBuilder</a></span></tt>
488
-
489
-
490
-
491
-
492
-
493
- </h3><div class="docstring">
494
- <div class="discussion">
495
-
496
- <p>Returns a new instance of ResourceBuilder</p>
497
-
498
-
499
- </div>
500
- </div>
501
- <div class="tags">
502
-
503
-
504
- </div><table class="source_code">
505
- <tr>
506
- <td>
507
- <pre class="lines">
508
-
509
-
510
- 33
511
- 34
512
- 35
513
- 36
514
- 37
515
- 38
516
- 39
517
- 40
518
- 41
519
- 42
520
- 43</pre>
521
- </td>
522
- <td>
523
- <pre class="code"><span class="info file"># File 'lib/contentful/resource_builder.rb', line 33</span>
524
-
525
- <span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_json'>json</span><span class='comma'>,</span> <span class='id identifier rubyid_configuration'>configuration</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span><span class='comma'>,</span> <span class='id identifier rubyid_localized'>localized</span> <span class='op'>=</span> <span class='kw'>false</span><span class='comma'>,</span> <span class='id identifier rubyid_depth'>depth</span> <span class='op'>=</span> <span class='int'>0</span><span class='comma'>,</span> <span class='id identifier rubyid_endpoint'>endpoint</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='rparen'>)</span>
526
- <span class='ivar'>@json</span> <span class='op'>=</span> <span class='id identifier rubyid_json'>json</span>
527
- <span class='ivar'>@default_locale</span> <span class='op'>=</span> <span class='id identifier rubyid_configuration'>configuration</span><span class='period'>.</span><span class='id identifier rubyid_fetch'>fetch</span><span class='lparen'>(</span><span class='symbol'>:default_locale</span><span class='comma'>,</span> <span class='op'>::</span><span class='const'>Contentful</span><span class='op'>::</span><span class='const'>Client</span><span class='op'>::</span><span class='const'>DEFAULT_CONFIGURATION</span><span class='lbracket'>[</span><span class='symbol'>:default_locale</span><span class='rbracket'>]</span><span class='rparen'>)</span>
528
- <span class='ivar'>@resource_mapping</span> <span class='op'>=</span> <span class='id identifier rubyid_default_resource_mapping'>default_resource_mapping</span><span class='period'>.</span><span class='id identifier rubyid_merge'>merge</span><span class='lparen'>(</span><span class='id identifier rubyid_configuration'>configuration</span><span class='period'>.</span><span class='id identifier rubyid_fetch'>fetch</span><span class='lparen'>(</span><span class='symbol'>:resource_mapping</span><span class='comma'>,</span> <span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span><span class='rparen'>)</span>
529
- <span class='ivar'>@entry_mapping</span> <span class='op'>=</span> <span class='id identifier rubyid_default_entry_mapping'>default_entry_mapping</span><span class='period'>.</span><span class='id identifier rubyid_merge'>merge</span><span class='lparen'>(</span><span class='id identifier rubyid_configuration'>configuration</span><span class='period'>.</span><span class='id identifier rubyid_fetch'>fetch</span><span class='lparen'>(</span><span class='symbol'>:entry_mapping</span><span class='comma'>,</span> <span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span><span class='rparen'>)</span>
530
- <span class='ivar'>@includes_for_single</span> <span class='op'>=</span> <span class='id identifier rubyid_configuration'>configuration</span><span class='period'>.</span><span class='id identifier rubyid_fetch'>fetch</span><span class='lparen'>(</span><span class='symbol'>:includes_for_single</span><span class='comma'>,</span> <span class='lbracket'>[</span><span class='rbracket'>]</span><span class='rparen'>)</span>
531
- <span class='ivar'>@localized</span> <span class='op'>=</span> <span class='id identifier rubyid_localized'>localized</span>
532
- <span class='ivar'>@depth</span> <span class='op'>=</span> <span class='id identifier rubyid_depth'>depth</span>
533
- <span class='ivar'>@endpoint</span> <span class='op'>=</span> <span class='id identifier rubyid_endpoint'>endpoint</span>
534
- <span class='ivar'>@configuration</span> <span class='op'>=</span> <span class='id identifier rubyid_configuration'>configuration</span>
535
- <span class='kw'>end</span></pre>
536
- </td>
537
- </tr>
538
- </table>
539
- </div>
540
-
541
- </div>
542
-
543
- <div id="instance_attr_details" class="attr_details">
544
- <h2>Instance Attribute Details</h2>
545
-
546
-
547
- <span id=""></span>
548
- <div class="method_details first">
549
- <h3 class="signature first" id="default_locale-instance_method">
550
-
551
- #<strong>default_locale</strong> &#x21d2; <tt>Object</tt> <span class="extras">(readonly)</span>
552
-
553
-
554
-
555
-
556
-
557
- </h3><div class="docstring">
558
- <div class="discussion">
559
-
560
- <p>Returns the value of attribute default_locale</p>
561
-
562
-
563
- </div>
564
- </div>
565
- <div class="tags">
566
-
567
-
568
- </div><table class="source_code">
569
- <tr>
570
- <td>
571
- <pre class="lines">
572
-
573
-
574
- 31
575
- 32
576
- 33</pre>
577
- </td>
578
- <td>
579
- <pre class="code"><span class="info file"># File 'lib/contentful/resource_builder.rb', line 31</span>
580
-
581
- <span class='kw'>def</span> <span class='id identifier rubyid_default_locale'>default_locale</span>
582
- <span class='ivar'>@default_locale</span>
583
- <span class='kw'>end</span></pre>
584
- </td>
585
- </tr>
586
- </table>
587
- </div>
588
-
589
-
590
- <span id=""></span>
591
- <div class="method_details ">
592
- <h3 class="signature " id="depth-instance_method">
593
-
594
- #<strong>depth</strong> &#x21d2; <tt>Object</tt> <span class="extras">(readonly)</span>
595
-
596
-
597
-
598
-
599
-
600
- </h3><div class="docstring">
601
- <div class="discussion">
602
-
603
- <p>Returns the value of attribute depth</p>
604
-
605
-
606
- </div>
607
- </div>
608
- <div class="tags">
609
-
610
-
611
- </div><table class="source_code">
612
- <tr>
613
- <td>
614
- <pre class="lines">
615
-
616
-
617
- 31
618
- 32
619
- 33</pre>
620
- </td>
621
- <td>
622
- <pre class="code"><span class="info file"># File 'lib/contentful/resource_builder.rb', line 31</span>
623
-
624
- <span class='kw'>def</span> <span class='id identifier rubyid_depth'>depth</span>
625
- <span class='ivar'>@depth</span>
626
- <span class='kw'>end</span></pre>
627
- </td>
628
- </tr>
629
- </table>
630
- </div>
631
-
632
-
633
- <span id=""></span>
634
- <div class="method_details ">
635
- <h3 class="signature " id="endpoint-instance_method">
636
-
637
- #<strong>endpoint</strong> &#x21d2; <tt>Object</tt> <span class="extras">(readonly)</span>
638
-
639
-
640
-
641
-
642
-
643
- </h3><div class="docstring">
644
- <div class="discussion">
645
-
646
- <p>Returns the value of attribute endpoint</p>
647
-
648
-
649
- </div>
650
- </div>
651
- <div class="tags">
652
-
653
-
654
- </div><table class="source_code">
655
- <tr>
656
- <td>
657
- <pre class="lines">
658
-
659
-
660
- 31
661
- 32
662
- 33</pre>
663
- </td>
664
- <td>
665
- <pre class="code"><span class="info file"># File 'lib/contentful/resource_builder.rb', line 31</span>
666
-
667
- <span class='kw'>def</span> <span class='id identifier rubyid_endpoint'>endpoint</span>
668
- <span class='ivar'>@endpoint</span>
669
- <span class='kw'>end</span></pre>
670
- </td>
671
- </tr>
672
- </table>
673
- </div>
674
-
675
-
676
- <span id=""></span>
677
- <div class="method_details ">
678
- <h3 class="signature " id="entry_mapping-instance_method">
679
-
680
- #<strong>entry_mapping</strong> &#x21d2; <tt>Object</tt> <span class="extras">(readonly)</span>
681
-
682
-
683
-
684
-
685
-
686
- </h3><div class="docstring">
687
- <div class="discussion">
688
-
689
- <p>Returns the value of attribute entry_mapping</p>
690
-
691
-
692
- </div>
693
- </div>
694
- <div class="tags">
695
-
696
-
697
- </div><table class="source_code">
698
- <tr>
699
- <td>
700
- <pre class="lines">
701
-
702
-
703
- 31
704
- 32
705
- 33</pre>
706
- </td>
707
- <td>
708
- <pre class="code"><span class="info file"># File 'lib/contentful/resource_builder.rb', line 31</span>
709
-
710
- <span class='kw'>def</span> <span class='id identifier rubyid_entry_mapping'>entry_mapping</span>
711
- <span class='ivar'>@entry_mapping</span>
712
- <span class='kw'>end</span></pre>
713
- </td>
714
- </tr>
715
- </table>
716
- </div>
717
-
718
-
719
- <span id=""></span>
720
- <div class="method_details ">
721
- <h3 class="signature " id="json-instance_method">
722
-
723
- #<strong>json</strong> &#x21d2; <tt>Object</tt> <span class="extras">(readonly)</span>
724
-
725
-
726
-
727
-
728
-
729
- </h3><div class="docstring">
730
- <div class="discussion">
731
-
732
- <p>Returns the value of attribute json</p>
733
-
734
-
735
- </div>
736
- </div>
737
- <div class="tags">
738
-
739
-
740
- </div><table class="source_code">
741
- <tr>
742
- <td>
743
- <pre class="lines">
744
-
745
-
746
- 31
747
- 32
748
- 33</pre>
749
- </td>
750
- <td>
751
- <pre class="code"><span class="info file"># File 'lib/contentful/resource_builder.rb', line 31</span>
752
-
753
- <span class='kw'>def</span> <span class='id identifier rubyid_json'>json</span>
754
- <span class='ivar'>@json</span>
755
- <span class='kw'>end</span></pre>
756
- </td>
757
- </tr>
758
- </table>
759
- </div>
760
-
761
-
762
- <span id=""></span>
763
- <div class="method_details ">
764
- <h3 class="signature " id="localized-instance_method">
765
-
766
- #<strong>localized</strong> &#x21d2; <tt>Object</tt> <span class="extras">(readonly)</span>
767
-
768
-
769
-
770
-
771
-
772
- </h3><div class="docstring">
773
- <div class="discussion">
774
-
775
- <p>Returns the value of attribute localized</p>
776
-
777
-
778
- </div>
779
- </div>
780
- <div class="tags">
781
-
782
-
783
- </div><table class="source_code">
784
- <tr>
785
- <td>
786
- <pre class="lines">
787
-
788
-
789
- 31
790
- 32
791
- 33</pre>
792
- </td>
793
- <td>
794
- <pre class="code"><span class="info file"># File 'lib/contentful/resource_builder.rb', line 31</span>
795
-
796
- <span class='kw'>def</span> <span class='id identifier rubyid_localized'>localized</span>
797
- <span class='ivar'>@localized</span>
798
- <span class='kw'>end</span></pre>
799
- </td>
800
- </tr>
801
- </table>
802
- </div>
803
-
804
-
805
- <span id=""></span>
806
- <div class="method_details ">
807
- <h3 class="signature " id="resource-instance_method">
808
-
809
- #<strong>resource</strong> &#x21d2; <tt>Object</tt> <span class="extras">(readonly)</span>
810
-
811
-
812
-
813
-
814
-
815
- </h3><div class="docstring">
816
- <div class="discussion">
817
-
818
- <p>Returns the value of attribute resource</p>
819
-
820
-
821
- </div>
822
- </div>
823
- <div class="tags">
824
-
825
-
826
- </div><table class="source_code">
827
- <tr>
828
- <td>
829
- <pre class="lines">
830
-
831
-
832
- 31
833
- 32
834
- 33</pre>
835
- </td>
836
- <td>
837
- <pre class="code"><span class="info file"># File 'lib/contentful/resource_builder.rb', line 31</span>
838
-
839
- <span class='kw'>def</span> <span class='id identifier rubyid_resource'>resource</span>
840
- <span class='ivar'>@resource</span>
841
- <span class='kw'>end</span></pre>
842
- </td>
843
- </tr>
844
- </table>
845
- </div>
846
-
847
-
848
- <span id=""></span>
849
- <div class="method_details ">
850
- <h3 class="signature " id="resource_mapping-instance_method">
851
-
852
- #<strong>resource_mapping</strong> &#x21d2; <tt>Object</tt> <span class="extras">(readonly)</span>
853
-
854
-
855
-
856
-
857
-
858
- </h3><div class="docstring">
859
- <div class="discussion">
860
-
861
- <p>Returns the value of attribute resource_mapping</p>
862
-
863
-
864
- </div>
865
- </div>
866
- <div class="tags">
867
-
868
-
869
- </div><table class="source_code">
870
- <tr>
871
- <td>
872
- <pre class="lines">
873
-
874
-
875
- 31
876
- 32
877
- 33</pre>
878
- </td>
879
- <td>
880
- <pre class="code"><span class="info file"># File 'lib/contentful/resource_builder.rb', line 31</span>
881
-
882
- <span class='kw'>def</span> <span class='id identifier rubyid_resource_mapping'>resource_mapping</span>
883
- <span class='ivar'>@resource_mapping</span>
884
- <span class='kw'>end</span></pre>
885
- </td>
886
- </tr>
887
- </table>
888
- </div>
889
-
890
- </div>
891
-
892
-
893
- <div id="instance_method_details" class="method_details_list">
894
- <h2>Instance Method Details</h2>
895
-
896
-
897
- <div class="method_details first">
898
- <h3 class="signature first" id="run-instance_method">
899
-
900
- #<strong>run</strong> &#x21d2; <tt>Contentful::Resource</tt>, <tt><span class='object_link'><a href="Error.html" title="Contentful::Error (class)">Contentful::Error</a></span></tt>
901
-
902
-
903
-
904
-
905
-
906
- </h3><div class="docstring">
907
- <div class="discussion">
908
-
909
- <p>Starts the parsing process.</p>
910
-
911
-
912
- </div>
913
- </div>
914
- <div class="tags">
915
-
916
- <p class="tag_title">Returns:</p>
917
- <ul class="return">
918
-
919
- <li>
920
-
921
-
922
- <span class='type'>(<tt>Contentful::Resource</tt>, <tt><span class='object_link'><a href="Error.html" title="Contentful::Error (class)">Contentful::Error</a></span></tt>)</span>
923
-
924
-
925
-
926
- </li>
927
-
928
- </ul>
929
-
930
- </div><table class="source_code">
931
- <tr>
932
- <td>
933
- <pre class="lines">
934
-
935
-
936
- 48
937
- 49
938
- 50
939
- 51
940
- 52
941
- 53</pre>
942
- </td>
943
- <td>
944
- <pre class="code"><span class="info file"># File 'lib/contentful/resource_builder.rb', line 48</span>
945
-
946
- <span class='kw'>def</span> <span class='id identifier rubyid_run'>run</span>
947
- <span class='kw'>return</span> <span class='id identifier rubyid_build_array'>build_array</span> <span class='kw'>if</span> <span class='id identifier rubyid_array?'>array?</span>
948
- <span class='id identifier rubyid_build_single'>build_single</span>
949
- <span class='kw'>rescue</span> <span class='const'>UnparsableResource</span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_error'>error</span>
950
- <span class='id identifier rubyid_error'>error</span>
951
- <span class='kw'>end</span></pre>
952
- </td>
953
- </tr>
954
- </table>
955
- </div>
956
-
957
- </div>
958
-
959
- </div>
960
-
961
- <div id="footer">
962
- Generated on Tue Jul 25 15:15:33 2017 by
963
- <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
964
- 0.9.5 (ruby-2.4.1).
965
- </div>
966
-
967
- </div>
968
- </body>
969
- </html>