contentful 2.12.0 → 2.17.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +69 -1
- data/README.md +24 -13
- data/lib/contentful/array.rb +14 -6
- data/lib/contentful/array_like.rb +11 -2
- data/lib/contentful/asset.rb +10 -4
- data/lib/contentful/base_resource.rb +29 -6
- data/lib/contentful/client.rb +4 -3
- data/lib/contentful/coercions.rb +1 -4
- data/lib/contentful/entry.rb +9 -5
- data/lib/contentful/fields_resource.rb +7 -11
- data/lib/contentful/includes.rb +74 -0
- data/lib/contentful/request.rb +6 -1
- data/lib/contentful/resource_builder.rb +15 -12
- data/lib/contentful/support.rb +0 -35
- data/lib/contentful/version.rb +1 -1
- metadata +15 -370
- data/.gitignore +0 -7
- data/.rspec +0 -1
- data/.rubocop.yml +0 -28
- data/.rubocop_todo.yml +0 -35
- data/.travis.yml +0 -13
- data/.yardopts +0 -4
- data/Gemfile +0 -9
- data/Gemfile.lock +0 -152
- data/Guardfile +0 -24
- data/RELEASE.md +0 -8
- data/Rakefile +0 -33
- data/contentful.gemspec +0 -44
- data/coverage/.last_run.json +0 -5
- data/coverage/.resultset.json +0 -2419
- data/coverage/.resultset.json.lock +0 -0
- data/coverage/assets/0.10.2/application.css +0 -799
- data/coverage/assets/0.10.2/application.js +0 -1707
- data/coverage/assets/0.10.2/colorbox/border.png +0 -0
- data/coverage/assets/0.10.2/colorbox/controls.png +0 -0
- data/coverage/assets/0.10.2/colorbox/loading.gif +0 -0
- data/coverage/assets/0.10.2/colorbox/loading_background.png +0 -0
- data/coverage/assets/0.10.2/favicon_green.png +0 -0
- data/coverage/assets/0.10.2/favicon_red.png +0 -0
- data/coverage/assets/0.10.2/favicon_yellow.png +0 -0
- data/coverage/assets/0.10.2/loading.gif +0 -0
- data/coverage/assets/0.10.2/magnify.png +0 -0
- data/coverage/assets/0.10.2/smoothness/images/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
- data/coverage/assets/0.10.2/smoothness/images/ui-bg_flat_75_ffffff_40x100.png +0 -0
- data/coverage/assets/0.10.2/smoothness/images/ui-bg_glass_55_fbf9ee_1x400.png +0 -0
- data/coverage/assets/0.10.2/smoothness/images/ui-bg_glass_65_ffffff_1x400.png +0 -0
- data/coverage/assets/0.10.2/smoothness/images/ui-bg_glass_75_dadada_1x400.png +0 -0
- data/coverage/assets/0.10.2/smoothness/images/ui-bg_glass_75_e6e6e6_1x400.png +0 -0
- data/coverage/assets/0.10.2/smoothness/images/ui-bg_glass_95_fef1ec_1x400.png +0 -0
- data/coverage/assets/0.10.2/smoothness/images/ui-bg_highlight-soft_75_cccccc_1x100.png +0 -0
- data/coverage/assets/0.10.2/smoothness/images/ui-icons_222222_256x240.png +0 -0
- data/coverage/assets/0.10.2/smoothness/images/ui-icons_2e83ff_256x240.png +0 -0
- data/coverage/assets/0.10.2/smoothness/images/ui-icons_454545_256x240.png +0 -0
- data/coverage/assets/0.10.2/smoothness/images/ui-icons_888888_256x240.png +0 -0
- data/coverage/assets/0.10.2/smoothness/images/ui-icons_cd0a0a_256x240.png +0 -0
- data/coverage/index.html +0 -15071
- data/doc/Contentful/AccessDenied.html +0 -159
- data/doc/Contentful/Array.html +0 -765
- data/doc/Contentful/ArrayCoercion.html +0 -242
- data/doc/Contentful/ArrayLike.html +0 -625
- data/doc/Contentful/Asset.html +0 -487
- data/doc/Contentful/BadGateway.html +0 -159
- data/doc/Contentful/BadRequest.html +0 -159
- data/doc/Contentful/BaseCoercion.html +0 -445
- data/doc/Contentful/BaseResource.html +0 -599
- data/doc/Contentful/BooleanCoercion.html +0 -242
- data/doc/Contentful/Client.html +0 -1740
- data/doc/Contentful/ContentType.html +0 -618
- data/doc/Contentful/ContentTypeCache.html +0 -428
- data/doc/Contentful/DateCoercion.html +0 -244
- data/doc/Contentful/DeletedAsset.html +0 -157
- data/doc/Contentful/DeletedEntry.html +0 -157
- data/doc/Contentful/EmptyFieldError.html +0 -217
- data/doc/Contentful/Entry.html +0 -334
- data/doc/Contentful/Error.html +0 -410
- data/doc/Contentful/Field.html +0 -936
- data/doc/Contentful/FieldsResource.html +0 -583
- data/doc/Contentful/File.html +0 -218
- data/doc/Contentful/FloatCoercion.html +0 -238
- data/doc/Contentful/IntegerCoercion.html +0 -238
- data/doc/Contentful/Link.html +0 -249
- data/doc/Contentful/LinkCoercion.html +0 -158
- data/doc/Contentful/Locale.html +0 -537
- data/doc/Contentful/Location.html +0 -383
- data/doc/Contentful/LocationCoercion.html +0 -238
- data/doc/Contentful/NotFound.html +0 -159
- data/doc/Contentful/ObjectCoercion.html +0 -238
- data/doc/Contentful/RateLimitExceeded.html +0 -346
- data/doc/Contentful/Request.html +0 -887
- data/doc/Contentful/ResourceBuilder.html +0 -978
- data/doc/Contentful/ResourceReferences.html +0 -254
- data/doc/Contentful/Response.html +0 -710
- data/doc/Contentful/RichTextCoercion.html +0 -238
- data/doc/Contentful/ServerError.html +0 -159
- data/doc/Contentful/ServiceUnavailable.html +0 -159
- data/doc/Contentful/Space.html +0 -393
- data/doc/Contentful/StringCoercion.html +0 -242
- data/doc/Contentful/StructuredTextCoercion.html +0 -238
- data/doc/Contentful/Support.html +0 -788
- data/doc/Contentful/SymbolCoercion.html +0 -169
- data/doc/Contentful/Sync.html +0 -653
- data/doc/Contentful/SyncPage.html +0 -807
- data/doc/Contentful/TextCoercion.html +0 -169
- data/doc/Contentful/Unauthorized.html +0 -159
- data/doc/Contentful/UnparsableJson.html +0 -159
- data/doc/Contentful/UnparsableResource.html +0 -135
- data/doc/Contentful.html +0 -157
- data/doc/_index.html +0 -563
- data/doc/class_list.html +0 -51
- data/doc/css/common.css +0 -1
- data/doc/css/full_list.css +0 -58
- data/doc/css/style.css +0 -496
- data/doc/file.CHANGELOG.html +0 -729
- data/doc/file.LICENSE.html +0 -70
- data/doc/file.README.html +0 -925
- data/doc/file_list.html +0 -66
- data/doc/frames.html +0 -17
- data/doc/index.html +0 -925
- data/doc/js/app.js +0 -292
- data/doc/js/full_list.js +0 -216
- data/doc/js/jquery.js +0 -4
- data/doc/method_list.html +0 -1171
- data/doc/top-level-namespace.html +0 -110
- data/examples/custom_classes.rb +0 -39
- data/examples/example_queries.rb +0 -26
- data/examples/raise_errors.rb +0 -20
- data/examples/raw_mode.rb +0 -14
- data/spec/array_spec.rb +0 -122
- data/spec/asset_spec.rb +0 -192
- data/spec/auto_includes_spec.rb +0 -12
- data/spec/client_class_spec.rb +0 -86
- data/spec/client_configuration_spec.rb +0 -377
- data/spec/content_type_spec.rb +0 -49
- data/spec/deleted_asset_spec.rb +0 -38
- data/spec/deleted_entry_spec.rb +0 -38
- data/spec/entry_spec.rb +0 -688
- data/spec/error_class_spec.rb +0 -327
- data/spec/error_requests_spec.rb +0 -87
- data/spec/field_spec.rb +0 -95
- data/spec/file_spec.rb +0 -33
- data/spec/fixtures/json_responses/400_details_errors_object.json +0 -14
- data/spec/fixtures/json_responses/400_details_errors_string.json +0 -12
- data/spec/fixtures/json_responses/400_details_string.json +0 -8
- data/spec/fixtures/json_responses/403_reasons.json +0 -13
- data/spec/fixtures/json_responses/404_details_string.json +0 -8
- data/spec/fixtures/json_responses/404_id.json +0 -11
- data/spec/fixtures/json_responses/404_sys_type.json +0 -12
- data/spec/fixtures/json_responses/404_type.json +0 -10
- data/spec/fixtures/json_responses/content_type.json +0 -83
- data/spec/fixtures/json_responses/default_400.json +0 -7
- data/spec/fixtures/json_responses/default_401.json +0 -7
- data/spec/fixtures/json_responses/default_403.json +0 -7
- data/spec/fixtures/json_responses/default_404.json +0 -7
- data/spec/fixtures/json_responses/default_429.json +0 -7
- data/spec/fixtures/json_responses/default_500.json +0 -7
- data/spec/fixtures/json_responses/default_502.json +0 -7
- data/spec/fixtures/json_responses/default_503.json +0 -7
- data/spec/fixtures/json_responses/includes.json +0 -111
- data/spec/fixtures/json_responses/link_array.json +0 -43
- data/spec/fixtures/json_responses/not_found.json +0 -13
- data/spec/fixtures/json_responses/nyancat.json +0 -48
- data/spec/fixtures/json_responses/other_error.json +0 -9
- data/spec/fixtures/json_responses/other_error_no_details.json +0 -8
- data/spec/fixtures/json_responses/other_error_no_message.json +0 -8
- data/spec/fixtures/json_responses/other_error_no_request_id.json +0 -8
- data/spec/fixtures/json_responses/other_error_nothing.json +0 -6
- data/spec/fixtures/json_responses/self_link.json +0 -82
- data/spec/fixtures/json_responses/unparsable.json +0 -13
- data/spec/fixtures/vcr_cassettes/array/marshal_custom_classes.yml +0 -159
- data/spec/fixtures/vcr_cassettes/array/nested_resources.yml +0 -159
- data/spec/fixtures/vcr_cassettes/array.yml +0 -288
- data/spec/fixtures/vcr_cassettes/arrayField.yml +0 -87
- data/spec/fixtures/vcr_cassettes/array_page_1.yml +0 -106
- data/spec/fixtures/vcr_cassettes/array_page_2.yml +0 -73
- data/spec/fixtures/vcr_cassettes/asset/select_empty_array.yml +0 -104
- data/spec/fixtures/vcr_cassettes/asset/select_no_sys.yml +0 -119
- data/spec/fixtures/vcr_cassettes/asset/select_one_field.yml +0 -97
- data/spec/fixtures/vcr_cassettes/asset/select_only_sys.yml +0 -88
- data/spec/fixtures/vcr_cassettes/asset.yml +0 -96
- data/spec/fixtures/vcr_cassettes/assets/issues_129.yml +0 -90
- data/spec/fixtures/vcr_cassettes/assets/issues_jekyll_46.yml +0 -115
- data/spec/fixtures/vcr_cassettes/bad_request.yml +0 -76
- data/spec/fixtures/vcr_cassettes/content_type.yml +0 -147
- data/spec/fixtures/vcr_cassettes/entries/empty_fields.yml +0 -246
- data/spec/fixtures/vcr_cassettes/entries/issue_117.yml +0 -201
- data/spec/fixtures/vcr_cassettes/entries/issue_125.yml +0 -198
- data/spec/fixtures/vcr_cassettes/entries/rich_text.yml +0 -1707
- data/spec/fixtures/vcr_cassettes/entries/rich_text_hydration_issue.yml +0 -460
- data/spec/fixtures/vcr_cassettes/entries/rich_text_nested_fields.yml +0 -653
- data/spec/fixtures/vcr_cassettes/entries/rich_text_unresolved_relationships.yml +0 -983
- data/spec/fixtures/vcr_cassettes/entries/unresolvable_filter.yml +0 -159
- data/spec/fixtures/vcr_cassettes/entries/unresolvable_filter_deeply_nested.yml +0 -167
- data/spec/fixtures/vcr_cassettes/entries.yml +0 -561
- data/spec/fixtures/vcr_cassettes/entry/custom_resource.yml +0 -168
- data/spec/fixtures/vcr_cassettes/entry/include_resolution.yml +0 -101
- data/spec/fixtures/vcr_cassettes/entry/include_resolution_uniques.yml +0 -81
- data/spec/fixtures/vcr_cassettes/entry/json_objects.yml +0 -88
- data/spec/fixtures/vcr_cassettes/entry/json_objects_client.yml +0 -86
- data/spec/fixtures/vcr_cassettes/entry/marshal_138.yml +0 -159
- data/spec/fixtures/vcr_cassettes/entry/marshal_unpublished.yml +0 -303
- data/spec/fixtures/vcr_cassettes/entry/marshall.yml +0 -293
- data/spec/fixtures/vcr_cassettes/entry/raw.yml +0 -201
- data/spec/fixtures/vcr_cassettes/entry/search_link_to_asset.yml +0 -81
- data/spec/fixtures/vcr_cassettes/entry/search_link_to_entry.yml +0 -81
- data/spec/fixtures/vcr_cassettes/entry/search_link_to_entry_with_custom_query.yml +0 -115
- data/spec/fixtures/vcr_cassettes/entry/select_empty_array.yml +0 -111
- data/spec/fixtures/vcr_cassettes/entry/select_no_sys.yml +0 -102
- data/spec/fixtures/vcr_cassettes/entry/select_one_field.yml +0 -76
- data/spec/fixtures/vcr_cassettes/entry/select_one_field_proper.yml +0 -114
- data/spec/fixtures/vcr_cassettes/entry/select_only_sys.yml +0 -111
- data/spec/fixtures/vcr_cassettes/entry.yml +0 -102
- data/spec/fixtures/vcr_cassettes/entry_cache.yml +0 -288
- data/spec/fixtures/vcr_cassettes/entry_locales.yml +0 -104
- data/spec/fixtures/vcr_cassettes/field.yml +0 -147
- data/spec/fixtures/vcr_cassettes/human.yml +0 -118
- data/spec/fixtures/vcr_cassettes/linkField.yml +0 -83
- data/spec/fixtures/vcr_cassettes/locale.yml +0 -83
- data/spec/fixtures/vcr_cassettes/locale_from_environment.yml +0 -121
- data/spec/fixtures/vcr_cassettes/location.yml +0 -193
- data/spec/fixtures/vcr_cassettes/multi_locale_array_reference.yml +0 -196
- data/spec/fixtures/vcr_cassettes/multi_locale_reference.yml +0 -214
- data/spec/fixtures/vcr_cassettes/not_found.yml +0 -76
- data/spec/fixtures/vcr_cassettes/nyancat.yml +0 -102
- data/spec/fixtures/vcr_cassettes/ratelimit.yml +0 -64
- data/spec/fixtures/vcr_cassettes/ratelimit_retry.yml +0 -294
- data/spec/fixtures/vcr_cassettes/reloaded_entry.yml +0 -102
- data/spec/fixtures/vcr_cassettes/space.yml +0 -83
- data/spec/fixtures/vcr_cassettes/sync_deleted_asset.yml +0 -174
- data/spec/fixtures/vcr_cassettes/sync_deleted_entry.yml +0 -89
- data/spec/fixtures/vcr_cassettes/sync_deletion.yml +0 -191
- data/spec/fixtures/vcr_cassettes/sync_environment.yml +0 -81
- data/spec/fixtures/vcr_cassettes/sync_page.yml +0 -637
- data/spec/fixtures/vcr_cassettes/sync_page_2.yml +0 -71
- data/spec/fixtures/vcr_cassettes/sync_page_short.yml +0 -106
- data/spec/fixtures/vcr_cassettes/unauthorized.yml +0 -64
- data/spec/fixtures/vcr_cassettes/unavailable.yml +0 -76
- data/spec/link_spec.rb +0 -50
- data/spec/locale_spec.rb +0 -37
- data/spec/location_spec.rb +0 -25
- data/spec/request_spec.rb +0 -57
- data/spec/resource_building_spec.rb +0 -31
- data/spec/response_spec.rb +0 -62
- data/spec/space_spec.rb +0 -31
- data/spec/spec_helper.rb +0 -14
- data/spec/support/client.rb +0 -6
- data/spec/support/json_responses.rb +0 -18
- data/spec/support/vcr.rb +0 -16
- data/spec/sync_page_spec.rb +0 -103
- data/spec/sync_spec.rb +0 -180
data/doc/Contentful/Field.html
DELETED
@@ -1,936 +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::Field
|
8
|
-
|
9
|
-
— Documentation by YARD 0.9.18
|
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::Field";
|
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?1"></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 (F)</a> »
|
40
|
-
<span class='title'><span class='object_link'><a href="../Contentful.html" title="Contentful (module)">Contentful</a></span></span>
|
41
|
-
»
|
42
|
-
<span class="title">Field</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
|
-
<div id="content"><h1>Class: Contentful::Field
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
</h1>
|
67
|
-
<div class="box_info">
|
68
|
-
|
69
|
-
<dl>
|
70
|
-
<dt>Inherits:</dt>
|
71
|
-
<dd>
|
72
|
-
<span class="inheritName">Object</span>
|
73
|
-
|
74
|
-
<ul class="fullTree">
|
75
|
-
<li>Object</li>
|
76
|
-
|
77
|
-
<li class="next">Contentful::Field</li>
|
78
|
-
|
79
|
-
</ul>
|
80
|
-
<a href="#" class="inheritanceTree">show all</a>
|
81
|
-
|
82
|
-
</dd>
|
83
|
-
</dl>
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
<dl>
|
96
|
-
<dt>Defined in:</dt>
|
97
|
-
<dd>lib/contentful/field.rb</dd>
|
98
|
-
</dl>
|
99
|
-
|
100
|
-
</div>
|
101
|
-
|
102
|
-
<h2>Overview</h2><div class="docstring">
|
103
|
-
<div class="discussion">
|
104
|
-
|
105
|
-
<p>A ContentType's field schema See <a
|
106
|
-
href="https://www.contentful.com/developers/documentation/content-management-api/#resources-content-types-fields">www.contentful.com/developers/documentation/content-management-api/#resources-content-types-fields</a></p>
|
107
|
-
|
108
|
-
|
109
|
-
</div>
|
110
|
-
</div>
|
111
|
-
<div class="tags">
|
112
|
-
|
113
|
-
|
114
|
-
</div>
|
115
|
-
|
116
|
-
<h2>
|
117
|
-
Constant Summary
|
118
|
-
<small><a href="#" class="constants_summary_toggle">collapse</a></small>
|
119
|
-
</h2>
|
120
|
-
|
121
|
-
<dl class="constants">
|
122
|
-
|
123
|
-
<dt id="KNOWN_TYPES-constant" class="">KNOWN_TYPES =
|
124
|
-
<div class="docstring">
|
125
|
-
<div class="discussion">
|
126
|
-
|
127
|
-
<p>Coercions from Contentful Types to Ruby native types</p>
|
128
|
-
|
129
|
-
|
130
|
-
</div>
|
131
|
-
</div>
|
132
|
-
<div class="tags">
|
133
|
-
|
134
|
-
|
135
|
-
</div>
|
136
|
-
</dt>
|
137
|
-
<dd><pre class="code"><span class='lbrace'>{</span>
|
138
|
-
<span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>String</span><span class='tstring_end'>'</span></span> <span class='op'>=></span> <span class='const'><span class='object_link'><a href="StringCoercion.html" title="Contentful::StringCoercion (class)">StringCoercion</a></span></span><span class='comma'>,</span>
|
139
|
-
<span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>Text</span><span class='tstring_end'>'</span></span> <span class='op'>=></span> <span class='const'><span class='object_link'><a href="TextCoercion.html" title="Contentful::TextCoercion (class)">TextCoercion</a></span></span><span class='comma'>,</span>
|
140
|
-
<span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>Symbol</span><span class='tstring_end'>'</span></span> <span class='op'>=></span> <span class='const'><span class='object_link'><a href="SymbolCoercion.html" title="Contentful::SymbolCoercion (class)">SymbolCoercion</a></span></span><span class='comma'>,</span>
|
141
|
-
<span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>Integer</span><span class='tstring_end'>'</span></span> <span class='op'>=></span> <span class='const'><span class='object_link'><a href="IntegerCoercion.html" title="Contentful::IntegerCoercion (class)">IntegerCoercion</a></span></span><span class='comma'>,</span>
|
142
|
-
<span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>Number</span><span class='tstring_end'>'</span></span> <span class='op'>=></span> <span class='const'><span class='object_link'><a href="FloatCoercion.html" title="Contentful::FloatCoercion (class)">FloatCoercion</a></span></span><span class='comma'>,</span>
|
143
|
-
<span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>Boolean</span><span class='tstring_end'>'</span></span> <span class='op'>=></span> <span class='const'><span class='object_link'><a href="BooleanCoercion.html" title="Contentful::BooleanCoercion (class)">BooleanCoercion</a></span></span><span class='comma'>,</span>
|
144
|
-
<span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>Date</span><span class='tstring_end'>'</span></span> <span class='op'>=></span> <span class='const'><span class='object_link'><a href="DateCoercion.html" title="Contentful::DateCoercion (class)">DateCoercion</a></span></span><span class='comma'>,</span>
|
145
|
-
<span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>Location</span><span class='tstring_end'>'</span></span> <span class='op'>=></span> <span class='const'><span class='object_link'><a href="LocationCoercion.html" title="Contentful::LocationCoercion (class)">LocationCoercion</a></span></span><span class='comma'>,</span>
|
146
|
-
<span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>Object</span><span class='tstring_end'>'</span></span> <span class='op'>=></span> <span class='const'><span class='object_link'><a href="ObjectCoercion.html" title="Contentful::ObjectCoercion (class)">ObjectCoercion</a></span></span><span class='comma'>,</span>
|
147
|
-
<span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>Array</span><span class='tstring_end'>'</span></span> <span class='op'>=></span> <span class='const'><span class='object_link'><a href="ArrayCoercion.html" title="Contentful::ArrayCoercion (class)">ArrayCoercion</a></span></span><span class='comma'>,</span>
|
148
|
-
<span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>Link</span><span class='tstring_end'>'</span></span> <span class='op'>=></span> <span class='const'><span class='object_link'><a href="LinkCoercion.html" title="Contentful::LinkCoercion (class)">LinkCoercion</a></span></span><span class='comma'>,</span>
|
149
|
-
<span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>RichText</span><span class='tstring_end'>'</span></span> <span class='op'>=></span> <span class='const'><span class='object_link'><a href="RichTextCoercion.html" title="Contentful::RichTextCoercion (class)">RichTextCoercion</a></span></span>
|
150
|
-
<span class='rbrace'>}</span></pre></dd>
|
151
|
-
|
152
|
-
</dl>
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
<h2>Instance Attribute Summary <small><a href="#" class="summary_toggle">collapse</a></small></h2>
|
159
|
-
<ul class="summary">
|
160
|
-
|
161
|
-
<li class="public ">
|
162
|
-
<span class="summary_signature">
|
163
|
-
|
164
|
-
<a href="#id-instance_method" title="#id (instance method)">#<strong>id</strong> ⇒ Object </a>
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
</span>
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
<span class="note title readonly">readonly</span>
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
<span class="summary_desc"><div class='inline'>
|
184
|
-
<p>Returns the value of attribute id.</p>
|
185
|
-
</div></span>
|
186
|
-
|
187
|
-
</li>
|
188
|
-
|
189
|
-
|
190
|
-
<li class="public ">
|
191
|
-
<span class="summary_signature">
|
192
|
-
|
193
|
-
<a href="#items-instance_method" title="#items (instance method)">#<strong>items</strong> ⇒ Object </a>
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
</span>
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
<span class="note title readonly">readonly</span>
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
<span class="summary_desc"><div class='inline'>
|
213
|
-
<p>Returns the value of attribute items.</p>
|
214
|
-
</div></span>
|
215
|
-
|
216
|
-
</li>
|
217
|
-
|
218
|
-
|
219
|
-
<li class="public ">
|
220
|
-
<span class="summary_signature">
|
221
|
-
|
222
|
-
<a href="#link_type-instance_method" title="#link_type (instance method)">#<strong>link_type</strong> ⇒ Object </a>
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
</span>
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
<span class="note title readonly">readonly</span>
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
<span class="summary_desc"><div class='inline'>
|
242
|
-
<p>Returns the value of attribute link_type.</p>
|
243
|
-
</div></span>
|
244
|
-
|
245
|
-
</li>
|
246
|
-
|
247
|
-
|
248
|
-
<li class="public ">
|
249
|
-
<span class="summary_signature">
|
250
|
-
|
251
|
-
<a href="#localized-instance_method" title="#localized (instance method)">#<strong>localized</strong> ⇒ Object </a>
|
252
|
-
|
253
|
-
|
254
|
-
|
255
|
-
</span>
|
256
|
-
|
257
|
-
|
258
|
-
|
259
|
-
|
260
|
-
<span class="note title readonly">readonly</span>
|
261
|
-
|
262
|
-
|
263
|
-
|
264
|
-
|
265
|
-
|
266
|
-
|
267
|
-
|
268
|
-
|
269
|
-
|
270
|
-
<span class="summary_desc"><div class='inline'>
|
271
|
-
<p>Returns the value of attribute localized.</p>
|
272
|
-
</div></span>
|
273
|
-
|
274
|
-
</li>
|
275
|
-
|
276
|
-
|
277
|
-
<li class="public ">
|
278
|
-
<span class="summary_signature">
|
279
|
-
|
280
|
-
<a href="#name-instance_method" title="#name (instance method)">#<strong>name</strong> ⇒ Object </a>
|
281
|
-
|
282
|
-
|
283
|
-
|
284
|
-
</span>
|
285
|
-
|
286
|
-
|
287
|
-
|
288
|
-
|
289
|
-
<span class="note title readonly">readonly</span>
|
290
|
-
|
291
|
-
|
292
|
-
|
293
|
-
|
294
|
-
|
295
|
-
|
296
|
-
|
297
|
-
|
298
|
-
|
299
|
-
<span class="summary_desc"><div class='inline'>
|
300
|
-
<p>Returns the value of attribute name.</p>
|
301
|
-
</div></span>
|
302
|
-
|
303
|
-
</li>
|
304
|
-
|
305
|
-
|
306
|
-
<li class="public ">
|
307
|
-
<span class="summary_signature">
|
308
|
-
|
309
|
-
<a href="#raw-instance_method" title="#raw (instance method)">#<strong>raw</strong> ⇒ Object </a>
|
310
|
-
|
311
|
-
|
312
|
-
|
313
|
-
</span>
|
314
|
-
|
315
|
-
|
316
|
-
|
317
|
-
|
318
|
-
<span class="note title readonly">readonly</span>
|
319
|
-
|
320
|
-
|
321
|
-
|
322
|
-
|
323
|
-
|
324
|
-
|
325
|
-
|
326
|
-
|
327
|
-
|
328
|
-
<span class="summary_desc"><div class='inline'>
|
329
|
-
<p>Returns the value of attribute raw.</p>
|
330
|
-
</div></span>
|
331
|
-
|
332
|
-
</li>
|
333
|
-
|
334
|
-
|
335
|
-
<li class="public ">
|
336
|
-
<span class="summary_signature">
|
337
|
-
|
338
|
-
<a href="#required-instance_method" title="#required (instance method)">#<strong>required</strong> ⇒ Object </a>
|
339
|
-
|
340
|
-
|
341
|
-
|
342
|
-
</span>
|
343
|
-
|
344
|
-
|
345
|
-
|
346
|
-
|
347
|
-
<span class="note title readonly">readonly</span>
|
348
|
-
|
349
|
-
|
350
|
-
|
351
|
-
|
352
|
-
|
353
|
-
|
354
|
-
|
355
|
-
|
356
|
-
|
357
|
-
<span class="summary_desc"><div class='inline'>
|
358
|
-
<p>Returns the value of attribute required.</p>
|
359
|
-
</div></span>
|
360
|
-
|
361
|
-
</li>
|
362
|
-
|
363
|
-
|
364
|
-
<li class="public ">
|
365
|
-
<span class="summary_signature">
|
366
|
-
|
367
|
-
<a href="#type-instance_method" title="#type (instance method)">#<strong>type</strong> ⇒ Object </a>
|
368
|
-
|
369
|
-
|
370
|
-
|
371
|
-
</span>
|
372
|
-
|
373
|
-
|
374
|
-
|
375
|
-
|
376
|
-
<span class="note title readonly">readonly</span>
|
377
|
-
|
378
|
-
|
379
|
-
|
380
|
-
|
381
|
-
|
382
|
-
|
383
|
-
|
384
|
-
|
385
|
-
|
386
|
-
<span class="summary_desc"><div class='inline'>
|
387
|
-
<p>Returns the value of attribute type.</p>
|
388
|
-
</div></span>
|
389
|
-
|
390
|
-
</li>
|
391
|
-
|
392
|
-
|
393
|
-
</ul>
|
394
|
-
|
395
|
-
|
396
|
-
|
397
|
-
|
398
|
-
|
399
|
-
<h2>
|
400
|
-
Instance Method Summary
|
401
|
-
<small><a href="#" class="summary_toggle">collapse</a></small>
|
402
|
-
</h2>
|
403
|
-
|
404
|
-
<ul class="summary">
|
405
|
-
|
406
|
-
<li class="public ">
|
407
|
-
<span class="summary_signature">
|
408
|
-
|
409
|
-
<a href="#coerce-instance_method" title="#coerce (instance method)">#<strong>coerce</strong>(value, configuration) ⇒ Object </a>
|
410
|
-
|
411
|
-
|
412
|
-
|
413
|
-
</span>
|
414
|
-
|
415
|
-
|
416
|
-
|
417
|
-
|
418
|
-
|
419
|
-
|
420
|
-
|
421
|
-
|
422
|
-
|
423
|
-
<span class="summary_desc"><div class='inline'>
|
424
|
-
<p>Coerces value to proper type.</p>
|
425
|
-
</div></span>
|
426
|
-
|
427
|
-
</li>
|
428
|
-
|
429
|
-
|
430
|
-
<li class="public ">
|
431
|
-
<span class="summary_signature">
|
432
|
-
|
433
|
-
<a href="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong>(json) ⇒ Field </a>
|
434
|
-
|
435
|
-
|
436
|
-
|
437
|
-
</span>
|
438
|
-
|
439
|
-
|
440
|
-
<span class="note title constructor">constructor</span>
|
441
|
-
|
442
|
-
|
443
|
-
|
444
|
-
|
445
|
-
|
446
|
-
|
447
|
-
|
448
|
-
|
449
|
-
<span class="summary_desc"><div class='inline'>
|
450
|
-
<p>A new instance of Field.</p>
|
451
|
-
</div></span>
|
452
|
-
|
453
|
-
</li>
|
454
|
-
|
455
|
-
|
456
|
-
</ul>
|
457
|
-
|
458
|
-
|
459
|
-
<div id="constructor_details" class="method_details_list">
|
460
|
-
<h2>Constructor Details</h2>
|
461
|
-
|
462
|
-
<div class="method_details first">
|
463
|
-
<h3 class="signature first" id="initialize-instance_method">
|
464
|
-
|
465
|
-
#<strong>initialize</strong>(json) ⇒ <tt><span class='object_link'><a href="" title="Contentful::Field (class)">Field</a></span></tt>
|
466
|
-
|
467
|
-
|
468
|
-
|
469
|
-
|
470
|
-
|
471
|
-
</h3><div class="docstring">
|
472
|
-
<div class="discussion">
|
473
|
-
|
474
|
-
<p>Returns a new instance of Field</p>
|
475
|
-
|
476
|
-
|
477
|
-
</div>
|
478
|
-
</div>
|
479
|
-
<div class="tags">
|
480
|
-
|
481
|
-
|
482
|
-
</div><table class="source_code">
|
483
|
-
<tr>
|
484
|
-
<td>
|
485
|
-
<pre class="lines">
|
486
|
-
|
487
|
-
|
488
|
-
26
|
489
|
-
27
|
490
|
-
28
|
491
|
-
29
|
492
|
-
30
|
493
|
-
31
|
494
|
-
32
|
495
|
-
33
|
496
|
-
34
|
497
|
-
35</pre>
|
498
|
-
</td>
|
499
|
-
<td>
|
500
|
-
<pre class="code"><span class="info file"># File 'lib/contentful/field.rb', line 26</span>
|
501
|
-
|
502
|
-
<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>
|
503
|
-
<span class='ivar'>@raw</span> <span class='op'>=</span> <span class='id identifier rubyid_json'>json</span>
|
504
|
-
<span class='ivar'>@id</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'>'</span><span class='tstring_content'>id</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='kw'>nil</span><span class='rparen'>)</span>
|
505
|
-
<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'>'</span><span class='tstring_content'>name</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='kw'>nil</span><span class='rparen'>)</span>
|
506
|
-
<span class='ivar'>@type</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'>'</span><span class='tstring_content'>type</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='kw'>nil</span><span class='rparen'>)</span>
|
507
|
-
<span class='ivar'>@link_type</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'>'</span><span class='tstring_content'>linkType</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='kw'>nil</span><span class='rparen'>)</span>
|
508
|
-
<span class='ivar'>@items</span> <span class='op'>=</span> <span class='id identifier rubyid_json'>json</span><span class='period'>.</span><span class='id identifier rubyid_key?'>key?</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>items</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span> <span class='op'>?</span> <span class='const'><span class='object_link'><a href="" title="Contentful::Field (class)">Field</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</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'>'</span><span class='tstring_content'>items</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span><span class='rparen'>)</span> <span class='op'>:</span> <span class='kw'>nil</span>
|
509
|
-
<span class='ivar'>@required</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'>'</span><span class='tstring_content'>required</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='kw'>false</span><span class='rparen'>)</span>
|
510
|
-
<span class='ivar'>@localized</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'>'</span><span class='tstring_content'>localized</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='kw'>false</span><span class='rparen'>)</span>
|
511
|
-
<span class='kw'>end</span></pre>
|
512
|
-
</td>
|
513
|
-
</tr>
|
514
|
-
</table>
|
515
|
-
</div>
|
516
|
-
|
517
|
-
</div>
|
518
|
-
|
519
|
-
<div id="instance_attr_details" class="attr_details">
|
520
|
-
<h2>Instance Attribute Details</h2>
|
521
|
-
|
522
|
-
|
523
|
-
<span id=""></span>
|
524
|
-
<div class="method_details first">
|
525
|
-
<h3 class="signature first" id="id-instance_method">
|
526
|
-
|
527
|
-
#<strong>id</strong> ⇒ <tt>Object</tt> <span class="extras">(readonly)</span>
|
528
|
-
|
529
|
-
|
530
|
-
|
531
|
-
|
532
|
-
|
533
|
-
</h3><div class="docstring">
|
534
|
-
<div class="discussion">
|
535
|
-
|
536
|
-
<p>Returns the value of attribute id</p>
|
537
|
-
|
538
|
-
|
539
|
-
</div>
|
540
|
-
</div>
|
541
|
-
<div class="tags">
|
542
|
-
|
543
|
-
|
544
|
-
</div><table class="source_code">
|
545
|
-
<tr>
|
546
|
-
<td>
|
547
|
-
<pre class="lines">
|
548
|
-
|
549
|
-
|
550
|
-
24
|
551
|
-
25
|
552
|
-
26</pre>
|
553
|
-
</td>
|
554
|
-
<td>
|
555
|
-
<pre class="code"><span class="info file"># File 'lib/contentful/field.rb', line 24</span>
|
556
|
-
|
557
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_id'>id</span>
|
558
|
-
<span class='ivar'>@id</span>
|
559
|
-
<span class='kw'>end</span></pre>
|
560
|
-
</td>
|
561
|
-
</tr>
|
562
|
-
</table>
|
563
|
-
</div>
|
564
|
-
|
565
|
-
|
566
|
-
<span id=""></span>
|
567
|
-
<div class="method_details ">
|
568
|
-
<h3 class="signature " id="items-instance_method">
|
569
|
-
|
570
|
-
#<strong>items</strong> ⇒ <tt>Object</tt> <span class="extras">(readonly)</span>
|
571
|
-
|
572
|
-
|
573
|
-
|
574
|
-
|
575
|
-
|
576
|
-
</h3><div class="docstring">
|
577
|
-
<div class="discussion">
|
578
|
-
|
579
|
-
<p>Returns the value of attribute items</p>
|
580
|
-
|
581
|
-
|
582
|
-
</div>
|
583
|
-
</div>
|
584
|
-
<div class="tags">
|
585
|
-
|
586
|
-
|
587
|
-
</div><table class="source_code">
|
588
|
-
<tr>
|
589
|
-
<td>
|
590
|
-
<pre class="lines">
|
591
|
-
|
592
|
-
|
593
|
-
24
|
594
|
-
25
|
595
|
-
26</pre>
|
596
|
-
</td>
|
597
|
-
<td>
|
598
|
-
<pre class="code"><span class="info file"># File 'lib/contentful/field.rb', line 24</span>
|
599
|
-
|
600
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_items'>items</span>
|
601
|
-
<span class='ivar'>@items</span>
|
602
|
-
<span class='kw'>end</span></pre>
|
603
|
-
</td>
|
604
|
-
</tr>
|
605
|
-
</table>
|
606
|
-
</div>
|
607
|
-
|
608
|
-
|
609
|
-
<span id=""></span>
|
610
|
-
<div class="method_details ">
|
611
|
-
<h3 class="signature " id="link_type-instance_method">
|
612
|
-
|
613
|
-
#<strong>link_type</strong> ⇒ <tt>Object</tt> <span class="extras">(readonly)</span>
|
614
|
-
|
615
|
-
|
616
|
-
|
617
|
-
|
618
|
-
|
619
|
-
</h3><div class="docstring">
|
620
|
-
<div class="discussion">
|
621
|
-
|
622
|
-
<p>Returns the value of attribute link_type</p>
|
623
|
-
|
624
|
-
|
625
|
-
</div>
|
626
|
-
</div>
|
627
|
-
<div class="tags">
|
628
|
-
|
629
|
-
|
630
|
-
</div><table class="source_code">
|
631
|
-
<tr>
|
632
|
-
<td>
|
633
|
-
<pre class="lines">
|
634
|
-
|
635
|
-
|
636
|
-
24
|
637
|
-
25
|
638
|
-
26</pre>
|
639
|
-
</td>
|
640
|
-
<td>
|
641
|
-
<pre class="code"><span class="info file"># File 'lib/contentful/field.rb', line 24</span>
|
642
|
-
|
643
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_link_type'>link_type</span>
|
644
|
-
<span class='ivar'>@link_type</span>
|
645
|
-
<span class='kw'>end</span></pre>
|
646
|
-
</td>
|
647
|
-
</tr>
|
648
|
-
</table>
|
649
|
-
</div>
|
650
|
-
|
651
|
-
|
652
|
-
<span id=""></span>
|
653
|
-
<div class="method_details ">
|
654
|
-
<h3 class="signature " id="localized-instance_method">
|
655
|
-
|
656
|
-
#<strong>localized</strong> ⇒ <tt>Object</tt> <span class="extras">(readonly)</span>
|
657
|
-
|
658
|
-
|
659
|
-
|
660
|
-
|
661
|
-
|
662
|
-
</h3><div class="docstring">
|
663
|
-
<div class="discussion">
|
664
|
-
|
665
|
-
<p>Returns the value of attribute localized</p>
|
666
|
-
|
667
|
-
|
668
|
-
</div>
|
669
|
-
</div>
|
670
|
-
<div class="tags">
|
671
|
-
|
672
|
-
|
673
|
-
</div><table class="source_code">
|
674
|
-
<tr>
|
675
|
-
<td>
|
676
|
-
<pre class="lines">
|
677
|
-
|
678
|
-
|
679
|
-
24
|
680
|
-
25
|
681
|
-
26</pre>
|
682
|
-
</td>
|
683
|
-
<td>
|
684
|
-
<pre class="code"><span class="info file"># File 'lib/contentful/field.rb', line 24</span>
|
685
|
-
|
686
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_localized'>localized</span>
|
687
|
-
<span class='ivar'>@localized</span>
|
688
|
-
<span class='kw'>end</span></pre>
|
689
|
-
</td>
|
690
|
-
</tr>
|
691
|
-
</table>
|
692
|
-
</div>
|
693
|
-
|
694
|
-
|
695
|
-
<span id=""></span>
|
696
|
-
<div class="method_details ">
|
697
|
-
<h3 class="signature " id="name-instance_method">
|
698
|
-
|
699
|
-
#<strong>name</strong> ⇒ <tt>Object</tt> <span class="extras">(readonly)</span>
|
700
|
-
|
701
|
-
|
702
|
-
|
703
|
-
|
704
|
-
|
705
|
-
</h3><div class="docstring">
|
706
|
-
<div class="discussion">
|
707
|
-
|
708
|
-
<p>Returns the value of attribute name</p>
|
709
|
-
|
710
|
-
|
711
|
-
</div>
|
712
|
-
</div>
|
713
|
-
<div class="tags">
|
714
|
-
|
715
|
-
|
716
|
-
</div><table class="source_code">
|
717
|
-
<tr>
|
718
|
-
<td>
|
719
|
-
<pre class="lines">
|
720
|
-
|
721
|
-
|
722
|
-
24
|
723
|
-
25
|
724
|
-
26</pre>
|
725
|
-
</td>
|
726
|
-
<td>
|
727
|
-
<pre class="code"><span class="info file"># File 'lib/contentful/field.rb', line 24</span>
|
728
|
-
|
729
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_name'>name</span>
|
730
|
-
<span class='ivar'>@name</span>
|
731
|
-
<span class='kw'>end</span></pre>
|
732
|
-
</td>
|
733
|
-
</tr>
|
734
|
-
</table>
|
735
|
-
</div>
|
736
|
-
|
737
|
-
|
738
|
-
<span id=""></span>
|
739
|
-
<div class="method_details ">
|
740
|
-
<h3 class="signature " id="raw-instance_method">
|
741
|
-
|
742
|
-
#<strong>raw</strong> ⇒ <tt>Object</tt> <span class="extras">(readonly)</span>
|
743
|
-
|
744
|
-
|
745
|
-
|
746
|
-
|
747
|
-
|
748
|
-
</h3><div class="docstring">
|
749
|
-
<div class="discussion">
|
750
|
-
|
751
|
-
<p>Returns the value of attribute raw</p>
|
752
|
-
|
753
|
-
|
754
|
-
</div>
|
755
|
-
</div>
|
756
|
-
<div class="tags">
|
757
|
-
|
758
|
-
|
759
|
-
</div><table class="source_code">
|
760
|
-
<tr>
|
761
|
-
<td>
|
762
|
-
<pre class="lines">
|
763
|
-
|
764
|
-
|
765
|
-
24
|
766
|
-
25
|
767
|
-
26</pre>
|
768
|
-
</td>
|
769
|
-
<td>
|
770
|
-
<pre class="code"><span class="info file"># File 'lib/contentful/field.rb', line 24</span>
|
771
|
-
|
772
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_raw'>raw</span>
|
773
|
-
<span class='ivar'>@raw</span>
|
774
|
-
<span class='kw'>end</span></pre>
|
775
|
-
</td>
|
776
|
-
</tr>
|
777
|
-
</table>
|
778
|
-
</div>
|
779
|
-
|
780
|
-
|
781
|
-
<span id=""></span>
|
782
|
-
<div class="method_details ">
|
783
|
-
<h3 class="signature " id="required-instance_method">
|
784
|
-
|
785
|
-
#<strong>required</strong> ⇒ <tt>Object</tt> <span class="extras">(readonly)</span>
|
786
|
-
|
787
|
-
|
788
|
-
|
789
|
-
|
790
|
-
|
791
|
-
</h3><div class="docstring">
|
792
|
-
<div class="discussion">
|
793
|
-
|
794
|
-
<p>Returns the value of attribute required</p>
|
795
|
-
|
796
|
-
|
797
|
-
</div>
|
798
|
-
</div>
|
799
|
-
<div class="tags">
|
800
|
-
|
801
|
-
|
802
|
-
</div><table class="source_code">
|
803
|
-
<tr>
|
804
|
-
<td>
|
805
|
-
<pre class="lines">
|
806
|
-
|
807
|
-
|
808
|
-
24
|
809
|
-
25
|
810
|
-
26</pre>
|
811
|
-
</td>
|
812
|
-
<td>
|
813
|
-
<pre class="code"><span class="info file"># File 'lib/contentful/field.rb', line 24</span>
|
814
|
-
|
815
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_required'>required</span>
|
816
|
-
<span class='ivar'>@required</span>
|
817
|
-
<span class='kw'>end</span></pre>
|
818
|
-
</td>
|
819
|
-
</tr>
|
820
|
-
</table>
|
821
|
-
</div>
|
822
|
-
|
823
|
-
|
824
|
-
<span id=""></span>
|
825
|
-
<div class="method_details ">
|
826
|
-
<h3 class="signature " id="type-instance_method">
|
827
|
-
|
828
|
-
#<strong>type</strong> ⇒ <tt>Object</tt> <span class="extras">(readonly)</span>
|
829
|
-
|
830
|
-
|
831
|
-
|
832
|
-
|
833
|
-
|
834
|
-
</h3><div class="docstring">
|
835
|
-
<div class="discussion">
|
836
|
-
|
837
|
-
<p>Returns the value of attribute type</p>
|
838
|
-
|
839
|
-
|
840
|
-
</div>
|
841
|
-
</div>
|
842
|
-
<div class="tags">
|
843
|
-
|
844
|
-
|
845
|
-
</div><table class="source_code">
|
846
|
-
<tr>
|
847
|
-
<td>
|
848
|
-
<pre class="lines">
|
849
|
-
|
850
|
-
|
851
|
-
24
|
852
|
-
25
|
853
|
-
26</pre>
|
854
|
-
</td>
|
855
|
-
<td>
|
856
|
-
<pre class="code"><span class="info file"># File 'lib/contentful/field.rb', line 24</span>
|
857
|
-
|
858
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_type'>type</span>
|
859
|
-
<span class='ivar'>@type</span>
|
860
|
-
<span class='kw'>end</span></pre>
|
861
|
-
</td>
|
862
|
-
</tr>
|
863
|
-
</table>
|
864
|
-
</div>
|
865
|
-
|
866
|
-
</div>
|
867
|
-
|
868
|
-
|
869
|
-
<div id="instance_method_details" class="method_details_list">
|
870
|
-
<h2>Instance Method Details</h2>
|
871
|
-
|
872
|
-
|
873
|
-
<div class="method_details first">
|
874
|
-
<h3 class="signature first" id="coerce-instance_method">
|
875
|
-
|
876
|
-
#<strong>coerce</strong>(value, configuration) ⇒ <tt>Object</tt>
|
877
|
-
|
878
|
-
|
879
|
-
|
880
|
-
|
881
|
-
|
882
|
-
</h3><div class="docstring">
|
883
|
-
<div class="discussion">
|
884
|
-
|
885
|
-
<p>Coerces value to proper type</p>
|
886
|
-
|
887
|
-
|
888
|
-
</div>
|
889
|
-
</div>
|
890
|
-
<div class="tags">
|
891
|
-
|
892
|
-
|
893
|
-
</div><table class="source_code">
|
894
|
-
<tr>
|
895
|
-
<td>
|
896
|
-
<pre class="lines">
|
897
|
-
|
898
|
-
|
899
|
-
38
|
900
|
-
39
|
901
|
-
40
|
902
|
-
41
|
903
|
-
42
|
904
|
-
43
|
905
|
-
44
|
906
|
-
45</pre>
|
907
|
-
</td>
|
908
|
-
<td>
|
909
|
-
<pre class="code"><span class="info file"># File 'lib/contentful/field.rb', line 38</span>
|
910
|
-
|
911
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_coerce'>coerce</span><span class='lparen'>(</span><span class='id identifier rubyid_value'>value</span><span class='comma'>,</span> <span class='id identifier rubyid_configuration'>configuration</span><span class='rparen'>)</span>
|
912
|
-
<span class='kw'>return</span> <span class='id identifier rubyid_value'>value</span> <span class='kw'>if</span> <span class='id identifier rubyid_type'>type</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span>
|
913
|
-
<span class='kw'>return</span> <span class='id identifier rubyid_value'>value</span> <span class='kw'>if</span> <span class='id identifier rubyid_value'>value</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span>
|
914
|
-
|
915
|
-
<span class='id identifier rubyid_options'>options</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span>
|
916
|
-
<span class='id identifier rubyid_options'>options</span><span class='lbracket'>[</span><span class='symbol'>:coercion_class</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="#KNOWN_TYPES-constant" title="Contentful::Field::KNOWN_TYPES (constant)">KNOWN_TYPES</a></span></span><span class='lbracket'>[</span><span class='id identifier rubyid_items'>items</span><span class='period'>.</span><span class='id identifier rubyid_type'>type</span><span class='rbracket'>]</span> <span class='kw'>unless</span> <span class='id identifier rubyid_items'>items</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span>
|
917
|
-
<span class='const'><span class='object_link'><a href="#KNOWN_TYPES-constant" title="Contentful::Field::KNOWN_TYPES (constant)">KNOWN_TYPES</a></span></span><span class='lbracket'>[</span><span class='id identifier rubyid_type'>type</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='id identifier rubyid_value'>value</span><span class='comma'>,</span> <span class='id identifier rubyid_options'>options</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_coerce'>coerce</span><span class='lparen'>(</span><span class='id identifier rubyid_configuration'>configuration</span><span class='rparen'>)</span>
|
918
|
-
<span class='kw'>end</span></pre>
|
919
|
-
</td>
|
920
|
-
</tr>
|
921
|
-
</table>
|
922
|
-
</div>
|
923
|
-
|
924
|
-
</div>
|
925
|
-
|
926
|
-
</div>
|
927
|
-
|
928
|
-
<div id="footer">
|
929
|
-
Generated on Tue Apr 9 10:49:56 2019 by
|
930
|
-
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
931
|
-
0.9.18 (ruby-2.5.3).
|
932
|
-
</div>
|
933
|
-
|
934
|
-
</div>
|
935
|
-
</body>
|
936
|
-
</html>
|