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,251 +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::Link
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::Link";
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 (L)</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">Link</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::Link
65
-
66
-
67
-
68
- </h1>
69
- <div class="box_info">
70
-
71
- <dl>
72
- <dt>Inherits:</dt>
73
- <dd>
74
- <span class="inheritName"><span class='object_link'><a href="BaseResource.html" title="Contentful::BaseResource (class)">BaseResource</a></span></span>
75
-
76
- <ul class="fullTree">
77
- <li>Object</li>
78
-
79
- <li class="next"><span class='object_link'><a href="BaseResource.html" title="Contentful::BaseResource (class)">BaseResource</a></span></li>
80
-
81
- <li class="next">Contentful::Link</li>
82
-
83
- </ul>
84
- <a href="#" class="inheritanceTree">show all</a>
85
-
86
- </dd>
87
- </dl>
88
-
89
-
90
-
91
-
92
-
93
-
94
-
95
-
96
-
97
-
98
-
99
- <dl>
100
- <dt>Defined in:</dt>
101
- <dd>lib/contentful/link.rb</dd>
102
- </dl>
103
-
104
- </div>
105
-
106
- <h2>Overview</h2><div class="docstring">
107
- <div class="discussion">
108
-
109
- <p>Resource Class for Links <a
110
- href="https://www.contentful.com/developers/documentation/content-delivery-api/#links">www.contentful.com/developers/documentation/content-delivery-api/#links</a></p>
111
-
112
-
113
- </div>
114
- </div>
115
- <div class="tags">
116
-
117
-
118
- </div>
119
-
120
-
121
-
122
-
123
-
124
- <h2>Instance Attribute Summary</h2>
125
-
126
- <h3 class="inherited">Attributes inherited from <span class='object_link'><a href="BaseResource.html" title="Contentful::BaseResource (class)">BaseResource</a></span></h3>
127
- <p class="inherited"><span class='object_link'><a href="BaseResource.html#default_locale-instance_method" title="Contentful::BaseResource#default_locale (method)">#default_locale</a></span>, <span class='object_link'><a href="BaseResource.html#raw-instance_method" title="Contentful::BaseResource#raw (method)">#raw</a></span>, <span class='object_link'><a href="BaseResource.html#sys-instance_method" title="Contentful::BaseResource#sys (method)">#sys</a></span></p>
128
-
129
-
130
-
131
- <h2>
132
- Instance Method Summary
133
- <small><a href="#" class="summary_toggle">collapse</a></small>
134
- </h2>
135
-
136
- <ul class="summary">
137
-
138
- <li class="public ">
139
- <span class="summary_signature">
140
-
141
- <a href="#resolve-instance_method" title="#resolve (instance method)">#<strong>resolve</strong>(client, query = {}) &#x21d2; Object </a>
142
-
143
-
144
-
145
- </span>
146
-
147
-
148
-
149
-
150
-
151
-
152
-
153
-
154
-
155
- <span class="summary_desc"><div class='inline'>
156
- <p>Queries contentful for the Resource the Link is refering to Takes an
157
- optional query hash.</p>
158
- </div></span>
159
-
160
- </li>
161
-
162
-
163
- </ul>
164
-
165
-
166
-
167
-
168
-
169
-
170
-
171
-
172
-
173
-
174
-
175
- <h3 class="inherited">Methods inherited from <span class='object_link'><a href="BaseResource.html" title="Contentful::BaseResource (class)">BaseResource</a></span></h3>
176
- <p class="inherited"><span class='object_link'><a href="BaseResource.html#%3D%3D-instance_method" title="Contentful::BaseResource#== (method)">#==</a></span>, <span class='object_link'><a href="BaseResource.html#initialize-instance_method" title="Contentful::BaseResource#initialize (method)">#initialize</a></span>, <span class='object_link'><a href="BaseResource.html#reload-instance_method" title="Contentful::BaseResource#reload (method)">#reload</a></span></p>
177
- <div id="constructor_details" class="method_details_list">
178
- <h2>Constructor Details</h2>
179
-
180
- <p class="notice">This class inherits a constructor from <span class='object_link'><a href="BaseResource.html#initialize-instance_method" title="Contentful::BaseResource#initialize (method)">Contentful::BaseResource</a></span></p>
181
-
182
- </div>
183
-
184
-
185
- <div id="instance_method_details" class="method_details_list">
186
- <h2>Instance Method Details</h2>
187
-
188
-
189
- <div class="method_details first">
190
- <h3 class="signature first" id="resolve-instance_method">
191
-
192
- #<strong>resolve</strong>(client, query = {}) &#x21d2; <tt>Object</tt>
193
-
194
-
195
-
196
-
197
-
198
- </h3><div class="docstring">
199
- <div class="discussion">
200
-
201
- <p>Queries contentful for the Resource the Link is refering to Takes an
202
- optional query hash</p>
203
-
204
-
205
- </div>
206
- </div>
207
- <div class="tags">
208
-
209
-
210
- </div><table class="source_code">
211
- <tr>
212
- <td>
213
- <pre class="lines">
214
-
215
-
216
- 9
217
- 10
218
- 11
219
- 12
220
- 13
221
- 14
222
- 15</pre>
223
- </td>
224
- <td>
225
- <pre class="code"><span class="info file"># File 'lib/contentful/link.rb', line 9</span>
226
-
227
- <span class='kw'>def</span> <span class='id identifier rubyid_resolve'>resolve</span><span class='lparen'>(</span><span class='id identifier rubyid_client'>client</span><span class='comma'>,</span> <span class='id identifier rubyid_query'>query</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span>
228
- <span class='id identifier rubyid_id_and_query'>id_and_query</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='lparen'>(</span><span class='id identifier rubyid_id'>id</span> <span class='kw'>unless</span> <span class='id identifier rubyid_link_type'>link_type</span> <span class='op'>==</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>Space</span><span class='tstring_end'>&#39;</span></span><span class='rparen'>)</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_compact'>compact</span> <span class='op'>+</span> <span class='lbracket'>[</span><span class='id identifier rubyid_query'>query</span><span class='rbracket'>]</span>
229
- <span class='id identifier rubyid_client'>client</span><span class='period'>.</span><span class='id identifier rubyid_public_send'>public_send</span><span class='lparen'>(</span>
230
- <span class='const'>Contentful</span><span class='op'>::</span><span class='const'>Support</span><span class='period'>.</span><span class='id identifier rubyid_snakify'>snakify</span><span class='lparen'>(</span><span class='id identifier rubyid_link_type'>link_type</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_to_sym'>to_sym</span><span class='comma'>,</span>
231
- <span class='op'>*</span><span class='id identifier rubyid_id_and_query'>id_and_query</span>
232
- <span class='rparen'>)</span>
233
- <span class='kw'>end</span></pre>
234
- </td>
235
- </tr>
236
- </table>
237
- </div>
238
-
239
- </div>
240
-
241
- </div>
242
-
243
- <div id="footer">
244
- Generated on Tue Jul 25 15:15:32 2017 by
245
- <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
246
- 0.9.5 (ruby-2.4.1).
247
- </div>
248
-
249
- </div>
250
- </body>
251
- </html>
@@ -1,160 +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::LinkCoercion
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::LinkCoercion";
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 (L)</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">LinkCoercion</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::LinkCoercion
65
-
66
-
67
-
68
- </h1>
69
- <div class="box_info">
70
-
71
- <dl>
72
- <dt>Inherits:</dt>
73
- <dd>
74
- <span class="inheritName"><span class='object_link'><a href="BaseCoercion.html" title="Contentful::BaseCoercion (class)">BaseCoercion</a></span></span>
75
-
76
- <ul class="fullTree">
77
- <li>Object</li>
78
-
79
- <li class="next"><span class='object_link'><a href="BaseCoercion.html" title="Contentful::BaseCoercion (class)">BaseCoercion</a></span></li>
80
-
81
- <li class="next">Contentful::LinkCoercion</li>
82
-
83
- </ul>
84
- <a href="#" class="inheritanceTree">show all</a>
85
-
86
- </dd>
87
- </dl>
88
-
89
-
90
-
91
-
92
-
93
-
94
-
95
-
96
-
97
-
98
-
99
- <dl>
100
- <dt>Defined in:</dt>
101
- <dd>lib/contentful/coercions.rb</dd>
102
- </dl>
103
-
104
- </div>
105
-
106
- <h2>Overview</h2><div class="docstring">
107
- <div class="discussion">
108
-
109
- <p>Coercion for Link Types Nothing should be done here as include resolution
110
- is handled within entries due to depth handling (explained within Entry).
111
- Only present as a placeholder for proper resolution within ContentType.</p>
112
-
113
-
114
- </div>
115
- </div>
116
- <div class="tags">
117
-
118
-
119
- </div>
120
-
121
-
122
-
123
-
124
-
125
- <h2>Instance Attribute Summary</h2>
126
-
127
- <h3 class="inherited">Attributes inherited from <span class='object_link'><a href="BaseCoercion.html" title="Contentful::BaseCoercion (class)">BaseCoercion</a></span></h3>
128
- <p class="inherited"><span class='object_link'><a href="BaseCoercion.html#options-instance_method" title="Contentful::BaseCoercion#options (method)">#options</a></span>, <span class='object_link'><a href="BaseCoercion.html#value-instance_method" title="Contentful::BaseCoercion#value (method)">#value</a></span></p>
129
-
130
-
131
-
132
-
133
-
134
-
135
-
136
-
137
-
138
- <h2>Method Summary</h2>
139
-
140
- <h3 class="inherited">Methods inherited from <span class='object_link'><a href="BaseCoercion.html" title="Contentful::BaseCoercion (class)">BaseCoercion</a></span></h3>
141
- <p class="inherited"><span class='object_link'><a href="BaseCoercion.html#coerce-instance_method" title="Contentful::BaseCoercion#coerce (method)">#coerce</a></span>, <span class='object_link'><a href="BaseCoercion.html#initialize-instance_method" title="Contentful::BaseCoercion#initialize (method)">#initialize</a></span></p>
142
- <div id="constructor_details" class="method_details_list">
143
- <h2>Constructor Details</h2>
144
-
145
- <p class="notice">This class inherits a constructor from <span class='object_link'><a href="BaseCoercion.html#initialize-instance_method" title="Contentful::BaseCoercion#initialize (method)">Contentful::BaseCoercion</a></span></p>
146
-
147
- </div>
148
-
149
-
150
- </div>
151
-
152
- <div id="footer">
153
- Generated on Tue Jul 25 15:15:33 2017 by
154
- <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
155
- 0.9.5 (ruby-2.4.1).
156
- </div>
157
-
158
- </div>
159
- </body>
160
- </html>
@@ -1,447 +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::Locale
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::Locale";
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 (L)</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">Locale</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::Locale
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::Locale</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/locale.rb</dd>
100
- </dl>
101
-
102
- </div>
103
-
104
- <h2>Overview</h2><div class="docstring">
105
- <div class="discussion">
106
-
107
- <p>A Locale definition as included in Space Read more about Localization at <a
108
- href="https://www.contentful.com/developers/documentation/content-delivery-api/#i18n">www.contentful.com/developers/documentation/content-delivery-api/#i18n</a></p>
109
-
110
-
111
- </div>
112
- </div>
113
- <div class="tags">
114
-
115
-
116
- </div>
117
-
118
-
119
-
120
- <h2>Instance Attribute Summary <small><a href="#" class="summary_toggle">collapse</a></small></h2>
121
- <ul class="summary">
122
-
123
- <li class="public ">
124
- <span class="summary_signature">
125
-
126
- <a href="#code-instance_method" title="#code (instance method)">#<strong>code</strong> &#x21d2; Object </a>
127
-
128
-
129
-
130
- </span>
131
-
132
-
133
-
134
-
135
- <span class="note title readonly">readonly</span>
136
-
137
-
138
-
139
-
140
-
141
-
142
-
143
-
144
-
145
- <span class="summary_desc"><div class='inline'>
146
- <p>Returns the value of attribute code.</p>
147
- </div></span>
148
-
149
- </li>
150
-
151
-
152
- <li class="public ">
153
- <span class="summary_signature">
154
-
155
- <a href="#default-instance_method" title="#default (instance method)">#<strong>default</strong> &#x21d2; Object </a>
156
-
157
-
158
-
159
- </span>
160
-
161
-
162
-
163
-
164
- <span class="note title readonly">readonly</span>
165
-
166
-
167
-
168
-
169
-
170
-
171
-
172
-
173
-
174
- <span class="summary_desc"><div class='inline'>
175
- <p>Returns the value of attribute default.</p>
176
- </div></span>
177
-
178
- </li>
179
-
180
-
181
- <li class="public ">
182
- <span class="summary_signature">
183
-
184
- <a href="#name-instance_method" title="#name (instance method)">#<strong>name</strong> &#x21d2; Object </a>
185
-
186
-
187
-
188
- </span>
189
-
190
-
191
-
192
-
193
- <span class="note title readonly">readonly</span>
194
-
195
-
196
-
197
-
198
-
199
-
200
-
201
-
202
-
203
- <span class="summary_desc"><div class='inline'>
204
- <p>Returns the value of attribute name.</p>
205
- </div></span>
206
-
207
- </li>
208
-
209
-
210
- </ul>
211
-
212
-
213
-
214
-
215
-
216
- <h2>
217
- Instance Method Summary
218
- <small><a href="#" class="summary_toggle">collapse</a></small>
219
- </h2>
220
-
221
- <ul class="summary">
222
-
223
- <li class="public ">
224
- <span class="summary_signature">
225
-
226
- <a href="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong>(json) &#x21d2; Locale </a>
227
-
228
-
229
-
230
- </span>
231
-
232
-
233
- <span class="note title constructor">constructor</span>
234
-
235
-
236
-
237
-
238
-
239
-
240
-
241
-
242
- <span class="summary_desc"><div class='inline'>
243
- <p>A new instance of Locale.</p>
244
- </div></span>
245
-
246
- </li>
247
-
248
-
249
- </ul>
250
-
251
-
252
- <div id="constructor_details" class="method_details_list">
253
- <h2>Constructor Details</h2>
254
-
255
- <div class="method_details first">
256
- <h3 class="signature first" id="initialize-instance_method">
257
-
258
- #<strong>initialize</strong>(json) &#x21d2; <tt><span class='object_link'><a href="" title="Contentful::Locale (class)">Locale</a></span></tt>
259
-
260
-
261
-
262
-
263
-
264
- </h3><div class="docstring">
265
- <div class="discussion">
266
-
267
- <p>Returns a new instance of Locale</p>
268
-
269
-
270
- </div>
271
- </div>
272
- <div class="tags">
273
-
274
-
275
- </div><table class="source_code">
276
- <tr>
277
- <td>
278
- <pre class="lines">
279
-
280
-
281
- 7
282
- 8
283
- 9
284
- 10
285
- 11</pre>
286
- </td>
287
- <td>
288
- <pre class="code"><span class="info file"># File 'lib/contentful/locale.rb', line 7</span>
289
-
290
- <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='rparen'>)</span>
291
- <span class='ivar'>@code</span> <span class='op'>=</span> <span class='id identifier rubyid_json'>json</span><span class='period'>.</span><span class='id identifier rubyid_fetch'>fetch</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>code</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span> <span class='kw'>nil</span><span class='rparen'>)</span>
292
- <span class='ivar'>@name</span> <span class='op'>=</span> <span class='id identifier rubyid_json'>json</span><span class='period'>.</span><span class='id identifier rubyid_fetch'>fetch</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>name</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span> <span class='kw'>nil</span><span class='rparen'>)</span>
293
- <span class='ivar'>@default</span> <span class='op'>=</span> <span class='id identifier rubyid_json'>json</span><span class='period'>.</span><span class='id identifier rubyid_fetch'>fetch</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>default</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span> <span class='kw'>false</span><span class='rparen'>)</span>
294
- <span class='kw'>end</span></pre>
295
- </td>
296
- </tr>
297
- </table>
298
- </div>
299
-
300
- </div>
301
-
302
- <div id="instance_attr_details" class="attr_details">
303
- <h2>Instance Attribute Details</h2>
304
-
305
-
306
- <span id=""></span>
307
- <div class="method_details first">
308
- <h3 class="signature first" id="code-instance_method">
309
-
310
- #<strong>code</strong> &#x21d2; <tt>Object</tt> <span class="extras">(readonly)</span>
311
-
312
-
313
-
314
-
315
-
316
- </h3><div class="docstring">
317
- <div class="discussion">
318
-
319
- <p>Returns the value of attribute code</p>
320
-
321
-
322
- </div>
323
- </div>
324
- <div class="tags">
325
-
326
-
327
- </div><table class="source_code">
328
- <tr>
329
- <td>
330
- <pre class="lines">
331
-
332
-
333
- 5
334
- 6
335
- 7</pre>
336
- </td>
337
- <td>
338
- <pre class="code"><span class="info file"># File 'lib/contentful/locale.rb', line 5</span>
339
-
340
- <span class='kw'>def</span> <span class='id identifier rubyid_code'>code</span>
341
- <span class='ivar'>@code</span>
342
- <span class='kw'>end</span></pre>
343
- </td>
344
- </tr>
345
- </table>
346
- </div>
347
-
348
-
349
- <span id=""></span>
350
- <div class="method_details ">
351
- <h3 class="signature " id="default-instance_method">
352
-
353
- #<strong>default</strong> &#x21d2; <tt>Object</tt> <span class="extras">(readonly)</span>
354
-
355
-
356
-
357
-
358
-
359
- </h3><div class="docstring">
360
- <div class="discussion">
361
-
362
- <p>Returns the value of attribute default</p>
363
-
364
-
365
- </div>
366
- </div>
367
- <div class="tags">
368
-
369
-
370
- </div><table class="source_code">
371
- <tr>
372
- <td>
373
- <pre class="lines">
374
-
375
-
376
- 5
377
- 6
378
- 7</pre>
379
- </td>
380
- <td>
381
- <pre class="code"><span class="info file"># File 'lib/contentful/locale.rb', line 5</span>
382
-
383
- <span class='kw'>def</span> <span class='id identifier rubyid_default'>default</span>
384
- <span class='ivar'>@default</span>
385
- <span class='kw'>end</span></pre>
386
- </td>
387
- </tr>
388
- </table>
389
- </div>
390
-
391
-
392
- <span id=""></span>
393
- <div class="method_details ">
394
- <h3 class="signature " id="name-instance_method">
395
-
396
- #<strong>name</strong> &#x21d2; <tt>Object</tt> <span class="extras">(readonly)</span>
397
-
398
-
399
-
400
-
401
-
402
- </h3><div class="docstring">
403
- <div class="discussion">
404
-
405
- <p>Returns the value of attribute name</p>
406
-
407
-
408
- </div>
409
- </div>
410
- <div class="tags">
411
-
412
-
413
- </div><table class="source_code">
414
- <tr>
415
- <td>
416
- <pre class="lines">
417
-
418
-
419
- 5
420
- 6
421
- 7</pre>
422
- </td>
423
- <td>
424
- <pre class="code"><span class="info file"># File 'lib/contentful/locale.rb', line 5</span>
425
-
426
- <span class='kw'>def</span> <span class='id identifier rubyid_name'>name</span>
427
- <span class='ivar'>@name</span>
428
- <span class='kw'>end</span></pre>
429
- </td>
430
- </tr>
431
- </table>
432
- </div>
433
-
434
- </div>
435
-
436
-
437
- </div>
438
-
439
- <div id="footer">
440
- Generated on Tue Jul 25 15:15:33 2017 by
441
- <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
442
- 0.9.5 (ruby-2.4.1).
443
- </div>
444
-
445
- </div>
446
- </body>
447
- </html>