prismic.io 1.4.1 → 1.4.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (107) hide show
  1. checksums.yaml +4 -4
  2. data/.yardopts +1 -1
  3. data/Gemfile.lock +1 -1
  4. data/README.md +6 -14
  5. data/docs/Prismic.html +1074 -0
  6. data/docs/Prismic/API.html +2987 -0
  7. data/docs/Prismic/API/BadPrismicResponseError.html +147 -0
  8. data/docs/Prismic/API/OAuth.html +560 -0
  9. data/docs/Prismic/API/PrismicWSAuthError.html +375 -0
  10. data/docs/Prismic/API/PrismicWSConnectionError.html +221 -0
  11. data/docs/Prismic/BasicNullCache.html +255 -0
  12. data/docs/Prismic/DefaultHTTPClient.html +350 -0
  13. data/docs/Prismic/Document.html +873 -0
  14. data/docs/Prismic/Error.html +418 -0
  15. data/docs/Prismic/Experiment.html +633 -0
  16. data/docs/Prismic/Experiments.html +633 -0
  17. data/docs/Prismic/Field.html +424 -0
  18. data/docs/Prismic/Form.html +827 -0
  19. data/docs/Prismic/Fragments.html +117 -0
  20. data/docs/Prismic/Fragments/Color.html +632 -0
  21. data/docs/Prismic/Fragments/Date.html +399 -0
  22. data/docs/Prismic/Fragments/DocumentLink.html +1048 -0
  23. data/docs/Prismic/Fragments/Embed.html +679 -0
  24. data/docs/Prismic/Fragments/FileLink.html +604 -0
  25. data/docs/Prismic/Fragments/Fragment.html +339 -0
  26. data/docs/Prismic/Fragments/GeoPoint.html +469 -0
  27. data/docs/Prismic/Fragments/Group.html +710 -0
  28. data/docs/Prismic/Fragments/GroupDocument.html +382 -0
  29. data/docs/Prismic/Fragments/Image.html +780 -0
  30. data/docs/Prismic/Fragments/Image/View.html +759 -0
  31. data/docs/Prismic/Fragments/Image/ViewDoesNotExistException.html +147 -0
  32. data/docs/Prismic/Fragments/ImageLink.html +336 -0
  33. data/docs/Prismic/Fragments/Link.html +412 -0
  34. data/docs/Prismic/Fragments/Multiple.html +513 -0
  35. data/docs/Prismic/Fragments/Number.html +401 -0
  36. data/docs/Prismic/Fragments/Select.html +349 -0
  37. data/docs/Prismic/Fragments/Separator.html +396 -0
  38. data/docs/Prismic/Fragments/Slice.html +632 -0
  39. data/docs/Prismic/Fragments/SliceZone.html +474 -0
  40. data/docs/Prismic/Fragments/StructuredText.html +664 -0
  41. data/docs/Prismic/Fragments/StructuredText/Block.html +232 -0
  42. data/docs/Prismic/Fragments/StructuredText/Block/Embed.html +367 -0
  43. data/docs/Prismic/Fragments/StructuredText/Block/Heading.html +366 -0
  44. data/docs/Prismic/Fragments/StructuredText/Block/Image.html +755 -0
  45. data/docs/Prismic/Fragments/StructuredText/Block/ListItem.html +372 -0
  46. data/docs/Prismic/Fragments/StructuredText/Block/Paragraph.html +223 -0
  47. data/docs/Prismic/Fragments/StructuredText/Block/Preformatted.html +223 -0
  48. data/docs/Prismic/Fragments/StructuredText/Block/Text.html +818 -0
  49. data/docs/Prismic/Fragments/StructuredText/BlockGroup.html +423 -0
  50. data/docs/Prismic/Fragments/StructuredText/Span.html +384 -0
  51. data/docs/Prismic/Fragments/StructuredText/Span/Em.html +213 -0
  52. data/docs/Prismic/Fragments/StructuredText/Span/Hyperlink.html +359 -0
  53. data/docs/Prismic/Fragments/StructuredText/Span/Label.html +362 -0
  54. data/docs/Prismic/Fragments/StructuredText/Span/Strong.html +213 -0
  55. data/docs/Prismic/Fragments/Text.html +396 -0
  56. data/docs/Prismic/Fragments/Timestamp.html +399 -0
  57. data/docs/Prismic/Fragments/WebLink.html +340 -0
  58. data/docs/Prismic/HtmlSerializer.html +270 -0
  59. data/docs/Prismic/JsonParser.html +1764 -0
  60. data/docs/Prismic/LinkResolver.html +399 -0
  61. data/docs/Prismic/LruCache.html +1140 -0
  62. data/docs/Prismic/Predicates.html +1630 -0
  63. data/docs/Prismic/Ref.html +643 -0
  64. data/docs/Prismic/Response.html +1159 -0
  65. data/docs/Prismic/SearchForm.html +2172 -0
  66. data/docs/Prismic/SearchForm/AuthenticationException.html +147 -0
  67. data/docs/Prismic/SearchForm/AuthorizationException.html +147 -0
  68. data/docs/Prismic/SearchForm/FormSearchException.html +147 -0
  69. data/docs/Prismic/SearchForm/NoRefSetException.html +147 -0
  70. data/docs/Prismic/SearchForm/RefNotFoundException.html +147 -0
  71. data/docs/Prismic/SearchForm/UnsupportedFormKind.html +147 -0
  72. data/docs/Prismic/Variation.html +546 -0
  73. data/docs/Prismic/WithFragments.html +1803 -0
  74. data/docs/_index.html +752 -0
  75. data/docs/class_list.html +54 -0
  76. data/docs/css/common.css +1 -0
  77. data/docs/css/full_list.css +57 -0
  78. data/docs/css/style.css +339 -0
  79. data/docs/file.README.html +180 -0
  80. data/docs/file_list.html +56 -0
  81. data/docs/frames.html +26 -0
  82. data/docs/index.html +180 -0
  83. data/docs/js/app.js +219 -0
  84. data/docs/js/full_list.js +178 -0
  85. data/docs/js/jquery.js +4 -0
  86. data/docs/method_list.html +2381 -0
  87. data/docs/top-level-namespace.html +112 -0
  88. data/lib/prismic.rb +17 -1
  89. data/lib/prismic/api.rb +31 -19
  90. data/lib/prismic/fragments/image.rb +6 -0
  91. data/lib/prismic/json_parsers.rb +2 -0
  92. data/lib/prismic/version.rb +1 -1
  93. data/spec/cache_spec.rb +12 -12
  94. data/spec/json_parsers_spec.rb +10 -5
  95. data/spec/oauth_spec.rb +3 -3
  96. data/spec/prismic_spec.rb +7 -7
  97. data/spec/responses_mocks/api.json +12 -12
  98. data/spec/responses_mocks/document.json +4 -2
  99. data/spec/responses_mocks/document_with_unknown_fragment.json +2 -0
  100. data/spec/responses_mocks/fragments.json +5 -3
  101. data/spec/responses_mocks/slices.json +2 -0
  102. data/spec/responses_mocks/structured_text_with_labels.json +2 -2
  103. data/spec/simple_search_spec.rb +55 -0
  104. metadata +103 -24
  105. data/deploy-doc.sh +0 -9
  106. data/spec/doc_spec.rb +0 -298
  107. data/spec/lesbonneschoses_spec.rb +0 -228
@@ -0,0 +1,1803 @@
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: Prismic::WithFragments
8
+
9
+ &mdash; Documentation by YARD 0.8.7.4
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#!Prismic/WithFragments.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 (W)</a> &raquo;
35
+ <span class='title'><span class='object_link'><a href="../Prismic.html" title="Prismic (module)">Prismic</a></span></span>
36
+ &raquo;
37
+ <span class="title">WithFragments</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: Prismic::WithFragments
67
+
68
+
69
+
70
+ </h1>
71
+
72
+ <dl class="box">
73
+
74
+
75
+
76
+
77
+
78
+ <dt class="r1">Includes:</dt>
79
+ <dd class="r1">Enumerable</dd>
80
+
81
+
82
+
83
+
84
+ <dt class="r2">Included in:</dt>
85
+ <dd class="r2"><span class='object_link'><a href="Document.html" title="Prismic::Document (class)">Document</a></span>, <span class='object_link'><a href="Fragments/DocumentLink.html" title="Prismic::Fragments::DocumentLink (class)">Fragments::DocumentLink</a></span>, <span class='object_link'><a href="Fragments/GroupDocument.html" title="Prismic::Fragments::GroupDocument (class)">Fragments::GroupDocument</a></span></dd>
86
+
87
+
88
+
89
+ <dt class="r1 last">Defined in:</dt>
90
+ <dd class="r1 last">lib/prismic/with_fragments.rb</dd>
91
+
92
+ </dl>
93
+ <div class="clear"></div>
94
+
95
+ <h2>Overview</h2><div class="docstring">
96
+ <div class="discussion">
97
+ <p>A document with Fragments: usually a Prismic.io Document, or a Document within a Group</p>
98
+
99
+
100
+ </div>
101
+ </div>
102
+ <div class="tags">
103
+
104
+
105
+ </div>
106
+
107
+
108
+
109
+ <h2>Instance Attribute Summary <small>(<a href="#" class="summary_toggle">collapse</a>)</small></h2>
110
+ <ul class="summary">
111
+
112
+ <li class="public ">
113
+ <span class="summary_signature">
114
+
115
+ <a href="#fragments-instance_method" title="#fragments (instance method)">- (Hash{String =&gt; Fragment}) <strong>fragments</strong> </a>
116
+
117
+
118
+
119
+ </span>
120
+
121
+
122
+
123
+
124
+
125
+
126
+
127
+
128
+
129
+
130
+
131
+
132
+ <span class="summary_desc"><div class='inline'></div></span>
133
+
134
+ </li>
135
+
136
+
137
+ </ul>
138
+
139
+
140
+
141
+
142
+
143
+ <h2>
144
+ Instance Method Summary
145
+ <small>(<a href="#" class="summary_toggle">collapse</a>)</small>
146
+ </h2>
147
+
148
+ <ul class="summary">
149
+
150
+ <li class="public ">
151
+ <span class="summary_signature">
152
+
153
+ <a href="#%5B%5D-instance_method" title="#[] (instance method)">- (Fragments::Fragment) <strong>[]</strong>(field) </a>
154
+
155
+
156
+
157
+ (also: #get)
158
+
159
+ </span>
160
+
161
+
162
+
163
+
164
+
165
+
166
+
167
+
168
+
169
+ <span class="summary_desc"><div class='inline'><p>Get a document&#39;s field.</p>
170
+ </div></span>
171
+
172
+ </li>
173
+
174
+
175
+ <li class="public ">
176
+ <span class="summary_signature">
177
+
178
+ <a href="#as_html-instance_method" title="#as_html (instance method)">- (String) <strong>as_html</strong>(link_resolver) </a>
179
+
180
+
181
+
182
+ </span>
183
+
184
+
185
+
186
+
187
+
188
+
189
+
190
+
191
+
192
+ <span class="summary_desc"><div class='inline'><p>Generate an HTML representation of the entire document.</p>
193
+ </div></span>
194
+
195
+ </li>
196
+
197
+
198
+ <li class="public ">
199
+ <span class="summary_signature">
200
+
201
+ <a href="#as_text-instance_method" title="#as_text (instance method)">- (String) <strong>as_text</strong> </a>
202
+
203
+
204
+
205
+ </span>
206
+
207
+
208
+
209
+
210
+
211
+
212
+
213
+
214
+
215
+ <span class="summary_desc"><div class='inline'><p>Generate a Text representation of the entire document.</p>
216
+ </div></span>
217
+
218
+ </li>
219
+
220
+
221
+ <li class="public ">
222
+ <span class="summary_signature">
223
+
224
+ <a href="#each-instance_method" title="#each (instance method)">- (Object) <strong>each</strong> {|name, fragment| ... }</a>
225
+
226
+
227
+
228
+ </span>
229
+
230
+
231
+
232
+
233
+
234
+
235
+
236
+
237
+
238
+ <span class="summary_desc"><div class='inline'></div></span>
239
+
240
+ </li>
241
+
242
+
243
+ <li class="public ">
244
+ <span class="summary_signature">
245
+
246
+ <a href="#first_title-instance_method" title="#first_title (instance method)">- (String) <strong>first_title</strong> </a>
247
+
248
+
249
+
250
+ </span>
251
+
252
+
253
+
254
+
255
+
256
+
257
+
258
+
259
+
260
+ <span class="summary_desc"><div class='inline'><p>Finds the first highest title in a document (if any).</p>
261
+ </div></span>
262
+
263
+ </li>
264
+
265
+
266
+ <li class="public ">
267
+ <span class="summary_signature">
268
+
269
+ <a href="#get_color-instance_method" title="#get_color (instance method)">- (Fragments::Color) <strong>get_color</strong>(field) </a>
270
+
271
+
272
+
273
+ </span>
274
+
275
+
276
+
277
+
278
+
279
+
280
+
281
+
282
+
283
+ <span class="summary_desc"><div class='inline'></div></span>
284
+
285
+ </li>
286
+
287
+
288
+ <li class="public ">
289
+ <span class="summary_signature">
290
+
291
+ <a href="#get_date-instance_method" title="#get_date (instance method)">- (Fragments::Date) <strong>get_date</strong>(field) </a>
292
+
293
+
294
+
295
+ </span>
296
+
297
+
298
+
299
+
300
+
301
+
302
+
303
+
304
+
305
+ <span class="summary_desc"><div class='inline'></div></span>
306
+
307
+ </li>
308
+
309
+
310
+ <li class="public ">
311
+ <span class="summary_signature">
312
+
313
+ <a href="#get_embed-instance_method" title="#get_embed (instance method)">- (Fragments::Embed) <strong>get_embed</strong>(field) </a>
314
+
315
+
316
+
317
+ </span>
318
+
319
+
320
+
321
+
322
+
323
+
324
+
325
+
326
+
327
+ <span class="summary_desc"><div class='inline'></div></span>
328
+
329
+ </li>
330
+
331
+
332
+ <li class="public ">
333
+ <span class="summary_signature">
334
+
335
+ <a href="#get_geopoint-instance_method" title="#get_geopoint (instance method)">- (Fragments::GeoPoint) <strong>get_geopoint</strong>(field) </a>
336
+
337
+
338
+
339
+ </span>
340
+
341
+
342
+
343
+
344
+
345
+
346
+
347
+
348
+
349
+ <span class="summary_desc"><div class='inline'></div></span>
350
+
351
+ </li>
352
+
353
+
354
+ <li class="public ">
355
+ <span class="summary_signature">
356
+
357
+ <a href="#get_group-instance_method" title="#get_group (instance method)">- (Fragments::Group) <strong>get_group</strong>(field) </a>
358
+
359
+
360
+
361
+ </span>
362
+
363
+
364
+
365
+
366
+
367
+
368
+
369
+
370
+
371
+ <span class="summary_desc"><div class='inline'></div></span>
372
+
373
+ </li>
374
+
375
+
376
+ <li class="public ">
377
+ <span class="summary_signature">
378
+
379
+ <a href="#get_image-instance_method" title="#get_image (instance method)">- (Fragments::Image) <strong>get_image</strong>(field) </a>
380
+
381
+
382
+
383
+ </span>
384
+
385
+
386
+
387
+
388
+
389
+
390
+
391
+
392
+
393
+ <span class="summary_desc"><div class='inline'></div></span>
394
+
395
+ </li>
396
+
397
+
398
+ <li class="public ">
399
+ <span class="summary_signature">
400
+
401
+ <a href="#get_link-instance_method" title="#get_link (instance method)">- (Fragments::Link) <strong>get_link</strong>(field) </a>
402
+
403
+
404
+
405
+ </span>
406
+
407
+
408
+
409
+
410
+
411
+
412
+
413
+
414
+
415
+ <span class="summary_desc"><div class='inline'></div></span>
416
+
417
+ </li>
418
+
419
+
420
+ <li class="public ">
421
+ <span class="summary_signature">
422
+
423
+ <a href="#get_number-instance_method" title="#get_number (instance method)">- (Fragments::Number) <strong>get_number</strong>(field) </a>
424
+
425
+
426
+
427
+ </span>
428
+
429
+
430
+
431
+
432
+
433
+
434
+
435
+
436
+
437
+ <span class="summary_desc"><div class='inline'></div></span>
438
+
439
+ </li>
440
+
441
+
442
+ <li class="public ">
443
+ <span class="summary_signature">
444
+
445
+ <a href="#get_slice_zone-instance_method" title="#get_slice_zone (instance method)">- (Object) <strong>get_slice_zone</strong>(field) </a>
446
+
447
+
448
+
449
+ </span>
450
+
451
+
452
+
453
+
454
+
455
+
456
+
457
+
458
+
459
+ <span class="summary_desc"><div class='inline'></div></span>
460
+
461
+ </li>
462
+
463
+
464
+ <li class="public ">
465
+ <span class="summary_signature">
466
+
467
+ <a href="#get_structured_text-instance_method" title="#get_structured_text (instance method)">- (Fragments::StructuredText) <strong>get_structured_text</strong>(field) </a>
468
+
469
+
470
+
471
+ </span>
472
+
473
+
474
+
475
+
476
+
477
+
478
+
479
+
480
+
481
+ <span class="summary_desc"><div class='inline'></div></span>
482
+
483
+ </li>
484
+
485
+
486
+ <li class="public ">
487
+ <span class="summary_signature">
488
+
489
+ <a href="#get_text-instance_method" title="#get_text (instance method)">- (Fragments::Text) <strong>get_text</strong>(field) </a>
490
+
491
+
492
+
493
+ </span>
494
+
495
+
496
+
497
+
498
+
499
+
500
+
501
+
502
+
503
+ <span class="summary_desc"><div class='inline'></div></span>
504
+
505
+ </li>
506
+
507
+
508
+ <li class="public ">
509
+ <span class="summary_signature">
510
+
511
+ <a href="#get_timestamp-instance_method" title="#get_timestamp (instance method)">- (Fragments::Timestamp) <strong>get_timestamp</strong>(field) </a>
512
+
513
+
514
+
515
+ </span>
516
+
517
+
518
+
519
+
520
+
521
+
522
+
523
+
524
+
525
+ <span class="summary_desc"><div class='inline'></div></span>
526
+
527
+ </li>
528
+
529
+
530
+ <li class="public ">
531
+ <span class="summary_signature">
532
+
533
+ <a href="#length-instance_method" title="#length (instance method)">- (Fixum) <strong>length</strong> </a>
534
+
535
+
536
+
537
+ (also: #size)
538
+
539
+ </span>
540
+
541
+
542
+
543
+
544
+
545
+
546
+
547
+
548
+
549
+ <span class="summary_desc"><div class='inline'></div></span>
550
+
551
+ </li>
552
+
553
+
554
+ <li class="public ">
555
+ <span class="summary_signature">
556
+
557
+ <a href="#linked_documents-instance_method" title="#linked_documents (instance method)">- (Array&lt;LinkedDocument&gt;) <strong>linked_documents</strong> </a>
558
+
559
+
560
+
561
+ </span>
562
+
563
+
564
+
565
+
566
+
567
+
568
+
569
+
570
+
571
+ <span class="summary_desc"><div class='inline'></div></span>
572
+
573
+ </li>
574
+
575
+
576
+ </ul>
577
+
578
+
579
+
580
+
581
+ <div id="instance_attr_details" class="attr_details">
582
+ <h2>Instance Attribute Details</h2>
583
+
584
+
585
+ <span id="fragments=-instance_method"></span>
586
+ <div class="method_details first">
587
+ <h3 class="signature first" id="fragments-instance_method">
588
+
589
+ - (<tt>Hash{String =&gt; Fragment}</tt>) <strong>fragments</strong>
590
+
591
+
592
+
593
+
594
+
595
+ </h3><div class="docstring">
596
+ <div class="discussion">
597
+
598
+
599
+ </div>
600
+ </div>
601
+ <div class="tags">
602
+
603
+ <p class="tag_title">Returns:</p>
604
+ <ul class="return">
605
+
606
+ <li>
607
+
608
+
609
+ <span class='type'>(<tt>Hash{String =&gt; Fragment}</tt>)</span>
610
+
611
+
612
+
613
+ </li>
614
+
615
+ </ul>
616
+
617
+ </div><table class="source_code">
618
+ <tr>
619
+ <td>
620
+ <pre class="lines">
621
+
622
+
623
+ 7
624
+ 8
625
+ 9</pre>
626
+ </td>
627
+ <td>
628
+ <pre class="code"><span class="info file"># File 'lib/prismic/with_fragments.rb', line 7</span>
629
+
630
+ <span class='kw'>def</span> <span class='id identifier rubyid_fragments'>fragments</span>
631
+ <span class='ivar'>@fragments</span>
632
+ <span class='kw'>end</span></pre>
633
+ </td>
634
+ </tr>
635
+ </table>
636
+ </div>
637
+
638
+ </div>
639
+
640
+
641
+ <div id="instance_method_details" class="method_details_list">
642
+ <h2>Instance Method Details</h2>
643
+
644
+
645
+ <div class="method_details first">
646
+ <h3 class="signature first" id="[]-instance_method">
647
+
648
+ - (<tt><span class='object_link'><a href="Fragments/Fragment.html" title="Prismic::Fragments::Fragment (class)">Fragments::Fragment</a></span></tt>) <strong>[]</strong>(field)
649
+
650
+
651
+
652
+ <span class="aliases">Also known as:
653
+ <span class="names"><span id='get-instance_method'>get</span></span>
654
+ </span>
655
+
656
+
657
+
658
+ </h3><div class="docstring">
659
+ <div class="discussion">
660
+ <p>Get a document&#39;s field</p>
661
+
662
+
663
+ </div>
664
+ </div>
665
+ <div class="tags">
666
+
667
+ <p class="tag_title">Returns:</p>
668
+ <ul class="return">
669
+
670
+ <li>
671
+
672
+
673
+ <span class='type'>(<tt><span class='object_link'><a href="Fragments/Fragment.html" title="Prismic::Fragments::Fragment (class)">Fragments::Fragment</a></span></tt>)</span>
674
+
675
+
676
+
677
+ </li>
678
+
679
+ </ul>
680
+
681
+ </div><table class="source_code">
682
+ <tr>
683
+ <td>
684
+ <pre class="lines">
685
+
686
+
687
+ 53
688
+ 54
689
+ 55
690
+ 56
691
+ 57
692
+ 58
693
+ 59
694
+ 60</pre>
695
+ </td>
696
+ <td>
697
+ <pre class="code"><span class="info file"># File 'lib/prismic/with_fragments.rb', line 53</span>
698
+
699
+ <span class='kw'>def</span> <span class='op'>[]</span><span class='lparen'>(</span><span class='id identifier rubyid_field'>field</span><span class='rparen'>)</span>
700
+ <span class='id identifier rubyid_array'>array</span> <span class='op'>=</span> <span class='id identifier rubyid_field'>field</span><span class='period'>.</span><span class='id identifier rubyid_split'>split</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>.</span><span class='tstring_end'>&#39;</span></span><span class='rparen'>)</span>
701
+ <span class='kw'>if</span> <span class='id identifier rubyid_array'>array</span><span class='period'>.</span><span class='id identifier rubyid_length'>length</span> <span class='op'>!=</span> <span class='int'>2</span>
702
+ <span class='id identifier rubyid_raise'>raise</span> <span class='const'>ArgumentError</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>Argument should contain one dot. Example: product.price</span><span class='tstring_end'>&#39;</span></span>
703
+ <span class='kw'>end</span>
704
+ <span class='kw'>return</span> <span class='kw'>nil</span> <span class='kw'>if</span> <span class='id identifier rubyid_array'>array</span><span class='lbracket'>[</span><span class='int'>0</span><span class='rbracket'>]</span> <span class='op'>!=</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_type'>type</span>
705
+ <span class='id identifier rubyid_fragments'>fragments</span><span class='lbracket'>[</span><span class='id identifier rubyid_array'>array</span><span class='lbracket'>[</span><span class='int'>1</span><span class='rbracket'>]</span><span class='rbracket'>]</span>
706
+ <span class='kw'>end</span></pre>
707
+ </td>
708
+ </tr>
709
+ </table>
710
+ </div>
711
+
712
+ <div class="method_details ">
713
+ <h3 class="signature " id="as_html-instance_method">
714
+
715
+ - (<tt>String</tt>) <strong>as_html</strong>(link_resolver)
716
+
717
+
718
+
719
+
720
+
721
+ </h3><div class="docstring">
722
+ <div class="discussion">
723
+ <p>Generate an HTML representation of the entire document</p>
724
+
725
+
726
+ </div>
727
+ </div>
728
+ <div class="tags">
729
+ <p class="tag_title">Parameters:</p>
730
+ <ul class="param">
731
+
732
+ <li>
733
+
734
+ <span class='name'>link_resolver</span>
735
+
736
+
737
+ <span class='type'>(<tt><span class='object_link'><a href="LinkResolver.html" title="Prismic::LinkResolver (class)">LinkResolver</a></span></tt>)</span>
738
+
739
+
740
+
741
+ &mdash;
742
+ <div class='inline'><p>The LinkResolver used to build
743
+ application&#39;s specific URL</p>
744
+ </div>
745
+
746
+ </li>
747
+
748
+ </ul>
749
+
750
+ <p class="tag_title">Returns:</p>
751
+ <ul class="return">
752
+
753
+ <li>
754
+
755
+
756
+ <span class='type'>(<tt>String</tt>)</span>
757
+
758
+
759
+
760
+ &mdash;
761
+ <div class='inline'><p>the HTML representation</p>
762
+ </div>
763
+
764
+ </li>
765
+
766
+ </ul>
767
+
768
+ </div><table class="source_code">
769
+ <tr>
770
+ <td>
771
+ <pre class="lines">
772
+
773
+
774
+ 22
775
+ 23
776
+ 24
777
+ 25
778
+ 26</pre>
779
+ </td>
780
+ <td>
781
+ <pre class="code"><span class="info file"># File 'lib/prismic/with_fragments.rb', line 22</span>
782
+
783
+ <span class='kw'>def</span> <span class='id identifier rubyid_as_html'>as_html</span><span class='lparen'>(</span><span class='id identifier rubyid_link_resolver'>link_resolver</span><span class='rparen'>)</span>
784
+ <span class='id identifier rubyid_fragments'>fragments</span><span class='period'>.</span><span class='id identifier rubyid_map'>map</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_field'>field</span><span class='comma'>,</span> <span class='id identifier rubyid_fragment'>fragment</span><span class='op'>|</span>
785
+ <span class='tstring'><span class='tstring_beg'>%(</span><span class='tstring_content'>&lt;section data-field=&quot;</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_field'>field</span><span class='embexpr_end'>}</span><span class='tstring_content'>&quot;&gt;</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_fragment'>fragment</span><span class='period'>.</span><span class='id identifier rubyid_as_html'>as_html</span><span class='lparen'>(</span><span class='id identifier rubyid_link_resolver'>link_resolver</span><span class='rparen'>)</span><span class='embexpr_end'>}</span><span class='tstring_content'>&lt;/section&gt;</span><span class='tstring_end'>)</span></span>
786
+ <span class='rbrace'>}</span><span class='period'>.</span><span class='id identifier rubyid_join'>join</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>\n</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span>
787
+ <span class='kw'>end</span></pre>
788
+ </td>
789
+ </tr>
790
+ </table>
791
+ </div>
792
+
793
+ <div class="method_details ">
794
+ <h3 class="signature " id="as_text-instance_method">
795
+
796
+ - (<tt>String</tt>) <strong>as_text</strong>
797
+
798
+
799
+
800
+
801
+
802
+ </h3><div class="docstring">
803
+ <div class="discussion">
804
+ <p>Generate a Text representation of the entire document</p>
805
+
806
+
807
+ </div>
808
+ </div>
809
+ <div class="tags">
810
+
811
+ <p class="tag_title">Returns:</p>
812
+ <ul class="return">
813
+
814
+ <li>
815
+
816
+
817
+ <span class='type'>(<tt>String</tt>)</span>
818
+
819
+
820
+
821
+ &mdash;
822
+ <div class='inline'><p>the text representation</p>
823
+ </div>
824
+
825
+ </li>
826
+
827
+ </ul>
828
+
829
+ </div><table class="source_code">
830
+ <tr>
831
+ <td>
832
+ <pre class="lines">
833
+
834
+
835
+ 12
836
+ 13
837
+ 14</pre>
838
+ </td>
839
+ <td>
840
+ <pre class="code"><span class="info file"># File 'lib/prismic/with_fragments.rb', line 12</span>
841
+
842
+ <span class='kw'>def</span> <span class='id identifier rubyid_as_text'>as_text</span>
843
+ <span class='id identifier rubyid_fragments'>fragments</span><span class='period'>.</span><span class='id identifier rubyid_map'>map</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_field'>field</span><span class='comma'>,</span> <span class='id identifier rubyid_fragment'>fragment</span><span class='op'>|</span> <span class='id identifier rubyid_fragment'>fragment</span><span class='period'>.</span><span class='id identifier rubyid_as_text'>as_text</span> <span class='rbrace'>}</span><span class='period'>.</span><span class='id identifier rubyid_join'>join</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>\n</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span>
844
+ <span class='kw'>end</span></pre>
845
+ </td>
846
+ </tr>
847
+ </table>
848
+ </div>
849
+
850
+ <div class="method_details ">
851
+ <h3 class="signature " id="each-instance_method">
852
+
853
+ - (<tt>Object</tt>) <strong>each</strong> {|name, fragment| ... }
854
+
855
+
856
+
857
+
858
+
859
+ </h3><div class="docstring">
860
+ <div class="discussion">
861
+
862
+
863
+ </div>
864
+ </div>
865
+ <div class="tags">
866
+
867
+ <p class="tag_title">Yield Parameters:</p>
868
+ <ul class="yieldparam">
869
+
870
+ <li>
871
+
872
+ <span class='name'>name</span>
873
+
874
+
875
+ <span class='type'>(<tt>String</tt>)</span>
876
+
877
+
878
+
879
+ </li>
880
+
881
+ <li>
882
+
883
+ <span class='name'>fragment</span>
884
+
885
+
886
+ <span class='type'>(<tt>Fragment</tt>)</span>
887
+
888
+
889
+
890
+ </li>
891
+
892
+ </ul>
893
+
894
+ </div><table class="source_code">
895
+ <tr>
896
+ <td>
897
+ <pre class="lines">
898
+
899
+
900
+ 65
901
+ 66
902
+ 67</pre>
903
+ </td>
904
+ <td>
905
+ <pre class="code"><span class="info file"># File 'lib/prismic/with_fragments.rb', line 65</span>
906
+
907
+ <span class='kw'>def</span> <span class='id identifier rubyid_each'>each</span><span class='lparen'>(</span><span class='op'>&amp;</span><span class='id identifier rubyid_blk'>blk</span><span class='rparen'>)</span>
908
+ <span class='ivar'>@fragments</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span><span class='lparen'>(</span><span class='op'>&amp;</span><span class='id identifier rubyid_blk'>blk</span><span class='rparen'>)</span>
909
+ <span class='kw'>end</span></pre>
910
+ </td>
911
+ </tr>
912
+ </table>
913
+ </div>
914
+
915
+ <div class="method_details ">
916
+ <h3 class="signature " id="first_title-instance_method">
917
+
918
+ - (<tt>String</tt>) <strong>first_title</strong>
919
+
920
+
921
+
922
+
923
+
924
+ </h3><div class="docstring">
925
+ <div class="discussion">
926
+ <p>Finds the first highest title in a document (if any)</p>
927
+
928
+
929
+ </div>
930
+ </div>
931
+ <div class="tags">
932
+
933
+ <p class="tag_title">Returns:</p>
934
+ <ul class="return">
935
+
936
+ <li>
937
+
938
+
939
+ <span class='type'>(<tt>String</tt>)</span>
940
+
941
+
942
+
943
+ </li>
944
+
945
+ </ul>
946
+
947
+ </div><table class="source_code">
948
+ <tr>
949
+ <td>
950
+ <pre class="lines">
951
+
952
+
953
+ 31
954
+ 32
955
+ 33
956
+ 34
957
+ 35
958
+ 36
959
+ 37
960
+ 38
961
+ 39
962
+ 40
963
+ 41
964
+ 42
965
+ 43
966
+ 44
967
+ 45
968
+ 46
969
+ 47
970
+ 48
971
+ 49</pre>
972
+ </td>
973
+ <td>
974
+ <pre class="code"><span class="info file"># File 'lib/prismic/with_fragments.rb', line 31</span>
975
+
976
+ <span class='kw'>def</span> <span class='id identifier rubyid_first_title'>first_title</span>
977
+ <span class='comment'># It is impossible to reuse the StructuredText.first_title method, since
978
+ </span> <span class='comment'># we need to test the highest title across the whole document
979
+ </span> <span class='id identifier rubyid_title'>title</span> <span class='op'>=</span> <span class='kw'>false</span>
980
+ <span class='id identifier rubyid_max_level'>max_level</span> <span class='op'>=</span> <span class='int'>6</span> <span class='comment'># any title with a higher level kicks the current one out
981
+ </span> <span class='ivar'>@fragments</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid__'>_</span><span class='comma'>,</span> <span class='id identifier rubyid_fragment'>fragment</span><span class='op'>|</span>
982
+ <span class='kw'>if</span> <span class='id identifier rubyid_fragment'>fragment</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span> <span class='const'>Prismic</span><span class='op'>::</span><span class='const'>Fragments</span><span class='op'>::</span><span class='const'>StructuredText</span>
983
+ <span class='id identifier rubyid_fragment'>fragment</span><span class='period'>.</span><span class='id identifier rubyid_blocks'>blocks</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_block'>block</span><span class='op'>|</span>
984
+ <span class='kw'>if</span> <span class='id identifier rubyid_block'>block</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</span><span class='const'>Prismic</span><span class='op'>::</span><span class='const'>Fragments</span><span class='op'>::</span><span class='const'>StructuredText</span><span class='op'>::</span><span class='const'>Block</span><span class='op'>::</span><span class='const'>Heading</span><span class='rparen'>)</span>
985
+ <span class='kw'>if</span> <span class='id identifier rubyid_block'>block</span><span class='period'>.</span><span class='id identifier rubyid_level'>level</span> <span class='op'>&lt;</span> <span class='id identifier rubyid_max_level'>max_level</span>
986
+ <span class='id identifier rubyid_title'>title</span> <span class='op'>=</span> <span class='id identifier rubyid_block'>block</span><span class='period'>.</span><span class='id identifier rubyid_text'>text</span>
987
+ <span class='id identifier rubyid_max_level'>max_level</span> <span class='op'>=</span> <span class='id identifier rubyid_block'>block</span><span class='period'>.</span><span class='id identifier rubyid_level'>level</span> <span class='comment'># new maximum
988
+ </span> <span class='kw'>end</span>
989
+ <span class='kw'>end</span>
990
+ <span class='kw'>end</span>
991
+ <span class='kw'>end</span>
992
+ <span class='kw'>end</span>
993
+ <span class='id identifier rubyid_title'>title</span>
994
+ <span class='kw'>end</span></pre>
995
+ </td>
996
+ </tr>
997
+ </table>
998
+ </div>
999
+
1000
+ <div class="method_details ">
1001
+ <h3 class="signature " id="get_color-instance_method">
1002
+
1003
+ - (<tt><span class='object_link'><a href="Fragments/Color.html" title="Prismic::Fragments::Color (class)">Fragments::Color</a></span></tt>) <strong>get_color</strong>(field)
1004
+
1005
+
1006
+
1007
+
1008
+
1009
+ </h3><div class="docstring">
1010
+ <div class="discussion">
1011
+
1012
+
1013
+ </div>
1014
+ </div>
1015
+ <div class="tags">
1016
+
1017
+ <p class="tag_title">Returns:</p>
1018
+ <ul class="return">
1019
+
1020
+ <li>
1021
+
1022
+
1023
+ <span class='type'>(<tt><span class='object_link'><a href="Fragments/Color.html" title="Prismic::Fragments::Color (class)">Fragments::Color</a></span></tt>)</span>
1024
+
1025
+
1026
+
1027
+ </li>
1028
+
1029
+ </ul>
1030
+
1031
+ </div><table class="source_code">
1032
+ <tr>
1033
+ <td>
1034
+ <pre class="lines">
1035
+
1036
+
1037
+ 140
1038
+ 141
1039
+ 142
1040
+ 143
1041
+ 144</pre>
1042
+ </td>
1043
+ <td>
1044
+ <pre class="code"><span class="info file"># File 'lib/prismic/with_fragments.rb', line 140</span>
1045
+
1046
+ <span class='kw'>def</span> <span class='id identifier rubyid_get_color'>get_color</span><span class='lparen'>(</span><span class='id identifier rubyid_field'>field</span><span class='rparen'>)</span>
1047
+ <span class='id identifier rubyid_fragment'>fragment</span> <span class='op'>=</span> <span class='kw'>self</span><span class='lbracket'>[</span><span class='id identifier rubyid_field'>field</span><span class='rbracket'>]</span>
1048
+ <span class='kw'>return</span> <span class='kw'>nil</span> <span class='kw'>unless</span> <span class='id identifier rubyid_fragment'>fragment</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span> <span class='const'>Prismic</span><span class='op'>::</span><span class='const'>Fragments</span><span class='op'>::</span><span class='const'>Color</span>
1049
+ <span class='id identifier rubyid_fragment'>fragment</span>
1050
+ <span class='kw'>end</span></pre>
1051
+ </td>
1052
+ </tr>
1053
+ </table>
1054
+ </div>
1055
+
1056
+ <div class="method_details ">
1057
+ <h3 class="signature " id="get_date-instance_method">
1058
+
1059
+ - (<tt><span class='object_link'><a href="Fragments/Date.html" title="Prismic::Fragments::Date (class)">Fragments::Date</a></span></tt>) <strong>get_date</strong>(field)
1060
+
1061
+
1062
+
1063
+
1064
+
1065
+ </h3><div class="docstring">
1066
+ <div class="discussion">
1067
+
1068
+
1069
+ </div>
1070
+ </div>
1071
+ <div class="tags">
1072
+
1073
+ <p class="tag_title">Returns:</p>
1074
+ <ul class="return">
1075
+
1076
+ <li>
1077
+
1078
+
1079
+ <span class='type'>(<tt><span class='object_link'><a href="Fragments/Date.html" title="Prismic::Fragments::Date (class)">Fragments::Date</a></span></tt>)</span>
1080
+
1081
+
1082
+
1083
+ </li>
1084
+
1085
+ </ul>
1086
+
1087
+ </div><table class="source_code">
1088
+ <tr>
1089
+ <td>
1090
+ <pre class="lines">
1091
+
1092
+
1093
+ 105
1094
+ 106
1095
+ 107
1096
+ 108
1097
+ 109</pre>
1098
+ </td>
1099
+ <td>
1100
+ <pre class="code"><span class="info file"># File 'lib/prismic/with_fragments.rb', line 105</span>
1101
+
1102
+ <span class='kw'>def</span> <span class='id identifier rubyid_get_date'>get_date</span><span class='lparen'>(</span><span class='id identifier rubyid_field'>field</span><span class='rparen'>)</span>
1103
+ <span class='id identifier rubyid_fragment'>fragment</span> <span class='op'>=</span> <span class='kw'>self</span><span class='lbracket'>[</span><span class='id identifier rubyid_field'>field</span><span class='rbracket'>]</span>
1104
+ <span class='kw'>return</span> <span class='kw'>nil</span> <span class='kw'>unless</span> <span class='id identifier rubyid_fragment'>fragment</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span> <span class='const'>Prismic</span><span class='op'>::</span><span class='const'>Fragments</span><span class='op'>::</span><span class='const'>Date</span>
1105
+ <span class='id identifier rubyid_fragment'>fragment</span>
1106
+ <span class='kw'>end</span></pre>
1107
+ </td>
1108
+ </tr>
1109
+ </table>
1110
+ </div>
1111
+
1112
+ <div class="method_details ">
1113
+ <h3 class="signature " id="get_embed-instance_method">
1114
+
1115
+ - (<tt><span class='object_link'><a href="Fragments/Embed.html" title="Prismic::Fragments::Embed (class)">Fragments::Embed</a></span></tt>) <strong>get_embed</strong>(field)
1116
+
1117
+
1118
+
1119
+
1120
+
1121
+ </h3><div class="docstring">
1122
+ <div class="discussion">
1123
+
1124
+
1125
+ </div>
1126
+ </div>
1127
+ <div class="tags">
1128
+
1129
+ <p class="tag_title">Returns:</p>
1130
+ <ul class="return">
1131
+
1132
+ <li>
1133
+
1134
+
1135
+ <span class='type'>(<tt><span class='object_link'><a href="Fragments/Embed.html" title="Prismic::Fragments::Embed (class)">Fragments::Embed</a></span></tt>)</span>
1136
+
1137
+
1138
+
1139
+ </li>
1140
+
1141
+ </ul>
1142
+
1143
+ </div><table class="source_code">
1144
+ <tr>
1145
+ <td>
1146
+ <pre class="lines">
1147
+
1148
+
1149
+ 133
1150
+ 134
1151
+ 135
1152
+ 136
1153
+ 137</pre>
1154
+ </td>
1155
+ <td>
1156
+ <pre class="code"><span class="info file"># File 'lib/prismic/with_fragments.rb', line 133</span>
1157
+
1158
+ <span class='kw'>def</span> <span class='id identifier rubyid_get_embed'>get_embed</span><span class='lparen'>(</span><span class='id identifier rubyid_field'>field</span><span class='rparen'>)</span>
1159
+ <span class='id identifier rubyid_fragment'>fragment</span> <span class='op'>=</span> <span class='kw'>self</span><span class='lbracket'>[</span><span class='id identifier rubyid_field'>field</span><span class='rbracket'>]</span>
1160
+ <span class='kw'>return</span> <span class='kw'>nil</span> <span class='kw'>unless</span> <span class='id identifier rubyid_fragment'>fragment</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span> <span class='const'>Prismic</span><span class='op'>::</span><span class='const'>Fragments</span><span class='op'>::</span><span class='const'>Embed</span>
1161
+ <span class='id identifier rubyid_fragment'>fragment</span>
1162
+ <span class='kw'>end</span></pre>
1163
+ </td>
1164
+ </tr>
1165
+ </table>
1166
+ </div>
1167
+
1168
+ <div class="method_details ">
1169
+ <h3 class="signature " id="get_geopoint-instance_method">
1170
+
1171
+ - (<tt><span class='object_link'><a href="Fragments/GeoPoint.html" title="Prismic::Fragments::GeoPoint (class)">Fragments::GeoPoint</a></span></tt>) <strong>get_geopoint</strong>(field)
1172
+
1173
+
1174
+
1175
+
1176
+
1177
+ </h3><div class="docstring">
1178
+ <div class="discussion">
1179
+
1180
+
1181
+ </div>
1182
+ </div>
1183
+ <div class="tags">
1184
+
1185
+ <p class="tag_title">Returns:</p>
1186
+ <ul class="return">
1187
+
1188
+ <li>
1189
+
1190
+
1191
+ <span class='type'>(<tt><span class='object_link'><a href="Fragments/GeoPoint.html" title="Prismic::Fragments::GeoPoint (class)">Fragments::GeoPoint</a></span></tt>)</span>
1192
+
1193
+
1194
+
1195
+ </li>
1196
+
1197
+ </ul>
1198
+
1199
+ </div><table class="source_code">
1200
+ <tr>
1201
+ <td>
1202
+ <pre class="lines">
1203
+
1204
+
1205
+ 147
1206
+ 148
1207
+ 149
1208
+ 150
1209
+ 151</pre>
1210
+ </td>
1211
+ <td>
1212
+ <pre class="code"><span class="info file"># File 'lib/prismic/with_fragments.rb', line 147</span>
1213
+
1214
+ <span class='kw'>def</span> <span class='id identifier rubyid_get_geopoint'>get_geopoint</span><span class='lparen'>(</span><span class='id identifier rubyid_field'>field</span><span class='rparen'>)</span>
1215
+ <span class='id identifier rubyid_fragment'>fragment</span> <span class='op'>=</span> <span class='kw'>self</span><span class='lbracket'>[</span><span class='id identifier rubyid_field'>field</span><span class='rbracket'>]</span>
1216
+ <span class='kw'>return</span> <span class='kw'>nil</span> <span class='kw'>unless</span> <span class='id identifier rubyid_fragment'>fragment</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span> <span class='const'>Prismic</span><span class='op'>::</span><span class='const'>Fragments</span><span class='op'>::</span><span class='const'>GeoPoint</span>
1217
+ <span class='id identifier rubyid_fragment'>fragment</span>
1218
+ <span class='kw'>end</span></pre>
1219
+ </td>
1220
+ </tr>
1221
+ </table>
1222
+ </div>
1223
+
1224
+ <div class="method_details ">
1225
+ <h3 class="signature " id="get_group-instance_method">
1226
+
1227
+ - (<tt><span class='object_link'><a href="Fragments/Group.html" title="Prismic::Fragments::Group (class)">Fragments::Group</a></span></tt>) <strong>get_group</strong>(field)
1228
+
1229
+
1230
+
1231
+
1232
+
1233
+ </h3><div class="docstring">
1234
+ <div class="discussion">
1235
+
1236
+
1237
+ </div>
1238
+ </div>
1239
+ <div class="tags">
1240
+
1241
+ <p class="tag_title">Returns:</p>
1242
+ <ul class="return">
1243
+
1244
+ <li>
1245
+
1246
+
1247
+ <span class='type'>(<tt><span class='object_link'><a href="Fragments/Group.html" title="Prismic::Fragments::Group (class)">Fragments::Group</a></span></tt>)</span>
1248
+
1249
+
1250
+
1251
+ </li>
1252
+
1253
+ </ul>
1254
+
1255
+ </div><table class="source_code">
1256
+ <tr>
1257
+ <td>
1258
+ <pre class="lines">
1259
+
1260
+
1261
+ 119
1262
+ 120
1263
+ 121
1264
+ 122
1265
+ 123</pre>
1266
+ </td>
1267
+ <td>
1268
+ <pre class="code"><span class="info file"># File 'lib/prismic/with_fragments.rb', line 119</span>
1269
+
1270
+ <span class='kw'>def</span> <span class='id identifier rubyid_get_group'>get_group</span><span class='lparen'>(</span><span class='id identifier rubyid_field'>field</span><span class='rparen'>)</span>
1271
+ <span class='id identifier rubyid_fragment'>fragment</span> <span class='op'>=</span> <span class='kw'>self</span><span class='lbracket'>[</span><span class='id identifier rubyid_field'>field</span><span class='rbracket'>]</span>
1272
+ <span class='kw'>return</span> <span class='kw'>nil</span> <span class='kw'>unless</span> <span class='id identifier rubyid_fragment'>fragment</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span> <span class='const'>Prismic</span><span class='op'>::</span><span class='const'>Fragments</span><span class='op'>::</span><span class='const'>Group</span>
1273
+ <span class='id identifier rubyid_fragment'>fragment</span>
1274
+ <span class='kw'>end</span></pre>
1275
+ </td>
1276
+ </tr>
1277
+ </table>
1278
+ </div>
1279
+
1280
+ <div class="method_details ">
1281
+ <h3 class="signature " id="get_image-instance_method">
1282
+
1283
+ - (<tt><span class='object_link'><a href="Fragments/Image.html" title="Prismic::Fragments::Image (class)">Fragments::Image</a></span></tt>) <strong>get_image</strong>(field)
1284
+
1285
+
1286
+
1287
+
1288
+
1289
+ </h3><div class="docstring">
1290
+ <div class="discussion">
1291
+
1292
+
1293
+ </div>
1294
+ </div>
1295
+ <div class="tags">
1296
+
1297
+ <p class="tag_title">Returns:</p>
1298
+ <ul class="return">
1299
+
1300
+ <li>
1301
+
1302
+
1303
+ <span class='type'>(<tt><span class='object_link'><a href="Fragments/Image.html" title="Prismic::Fragments::Image (class)">Fragments::Image</a></span></tt>)</span>
1304
+
1305
+
1306
+
1307
+ </li>
1308
+
1309
+ </ul>
1310
+
1311
+ </div><table class="source_code">
1312
+ <tr>
1313
+ <td>
1314
+ <pre class="lines">
1315
+
1316
+
1317
+ 98
1318
+ 99
1319
+ 100
1320
+ 101
1321
+ 102</pre>
1322
+ </td>
1323
+ <td>
1324
+ <pre class="code"><span class="info file"># File 'lib/prismic/with_fragments.rb', line 98</span>
1325
+
1326
+ <span class='kw'>def</span> <span class='id identifier rubyid_get_image'>get_image</span><span class='lparen'>(</span><span class='id identifier rubyid_field'>field</span><span class='rparen'>)</span>
1327
+ <span class='id identifier rubyid_fragment'>fragment</span> <span class='op'>=</span> <span class='kw'>self</span><span class='lbracket'>[</span><span class='id identifier rubyid_field'>field</span><span class='rbracket'>]</span>
1328
+ <span class='kw'>return</span> <span class='kw'>nil</span> <span class='kw'>unless</span> <span class='id identifier rubyid_fragment'>fragment</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span> <span class='const'>Prismic</span><span class='op'>::</span><span class='const'>Fragments</span><span class='op'>::</span><span class='const'>Image</span>
1329
+ <span class='id identifier rubyid_fragment'>fragment</span>
1330
+ <span class='kw'>end</span></pre>
1331
+ </td>
1332
+ </tr>
1333
+ </table>
1334
+ </div>
1335
+
1336
+ <div class="method_details ">
1337
+ <h3 class="signature " id="get_link-instance_method">
1338
+
1339
+ - (<tt><span class='object_link'><a href="Fragments/Link.html" title="Prismic::Fragments::Link (class)">Fragments::Link</a></span></tt>) <strong>get_link</strong>(field)
1340
+
1341
+
1342
+
1343
+
1344
+
1345
+ </h3><div class="docstring">
1346
+ <div class="discussion">
1347
+
1348
+
1349
+ </div>
1350
+ </div>
1351
+ <div class="tags">
1352
+
1353
+ <p class="tag_title">Returns:</p>
1354
+ <ul class="return">
1355
+
1356
+ <li>
1357
+
1358
+
1359
+ <span class='type'>(<tt><span class='object_link'><a href="Fragments/Link.html" title="Prismic::Fragments::Link (class)">Fragments::Link</a></span></tt>)</span>
1360
+
1361
+
1362
+
1363
+ </li>
1364
+
1365
+ </ul>
1366
+
1367
+ </div><table class="source_code">
1368
+ <tr>
1369
+ <td>
1370
+ <pre class="lines">
1371
+
1372
+
1373
+ 126
1374
+ 127
1375
+ 128
1376
+ 129
1377
+ 130</pre>
1378
+ </td>
1379
+ <td>
1380
+ <pre class="code"><span class="info file"># File 'lib/prismic/with_fragments.rb', line 126</span>
1381
+
1382
+ <span class='kw'>def</span> <span class='id identifier rubyid_get_link'>get_link</span><span class='lparen'>(</span><span class='id identifier rubyid_field'>field</span><span class='rparen'>)</span>
1383
+ <span class='id identifier rubyid_fragment'>fragment</span> <span class='op'>=</span> <span class='kw'>self</span><span class='lbracket'>[</span><span class='id identifier rubyid_field'>field</span><span class='rbracket'>]</span>
1384
+ <span class='kw'>return</span> <span class='kw'>nil</span> <span class='kw'>unless</span> <span class='id identifier rubyid_fragment'>fragment</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span> <span class='const'>Prismic</span><span class='op'>::</span><span class='const'>Fragments</span><span class='op'>::</span><span class='const'>Link</span>
1385
+ <span class='id identifier rubyid_fragment'>fragment</span>
1386
+ <span class='kw'>end</span></pre>
1387
+ </td>
1388
+ </tr>
1389
+ </table>
1390
+ </div>
1391
+
1392
+ <div class="method_details ">
1393
+ <h3 class="signature " id="get_number-instance_method">
1394
+
1395
+ - (<tt><span class='object_link'><a href="Fragments/Number.html" title="Prismic::Fragments::Number (class)">Fragments::Number</a></span></tt>) <strong>get_number</strong>(field)
1396
+
1397
+
1398
+
1399
+
1400
+
1401
+ </h3><div class="docstring">
1402
+ <div class="discussion">
1403
+
1404
+
1405
+ </div>
1406
+ </div>
1407
+ <div class="tags">
1408
+
1409
+ <p class="tag_title">Returns:</p>
1410
+ <ul class="return">
1411
+
1412
+ <li>
1413
+
1414
+
1415
+ <span class='type'>(<tt><span class='object_link'><a href="Fragments/Number.html" title="Prismic::Fragments::Number (class)">Fragments::Number</a></span></tt>)</span>
1416
+
1417
+
1418
+
1419
+ </li>
1420
+
1421
+ </ul>
1422
+
1423
+ </div><table class="source_code">
1424
+ <tr>
1425
+ <td>
1426
+ <pre class="lines">
1427
+
1428
+
1429
+ 91
1430
+ 92
1431
+ 93
1432
+ 94
1433
+ 95</pre>
1434
+ </td>
1435
+ <td>
1436
+ <pre class="code"><span class="info file"># File 'lib/prismic/with_fragments.rb', line 91</span>
1437
+
1438
+ <span class='kw'>def</span> <span class='id identifier rubyid_get_number'>get_number</span><span class='lparen'>(</span><span class='id identifier rubyid_field'>field</span><span class='rparen'>)</span>
1439
+ <span class='id identifier rubyid_fragment'>fragment</span> <span class='op'>=</span> <span class='kw'>self</span><span class='lbracket'>[</span><span class='id identifier rubyid_field'>field</span><span class='rbracket'>]</span>
1440
+ <span class='kw'>return</span> <span class='kw'>nil</span> <span class='kw'>unless</span> <span class='id identifier rubyid_fragment'>fragment</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span> <span class='const'>Prismic</span><span class='op'>::</span><span class='const'>Fragments</span><span class='op'>::</span><span class='const'>Number</span>
1441
+ <span class='id identifier rubyid_fragment'>fragment</span>
1442
+ <span class='kw'>end</span></pre>
1443
+ </td>
1444
+ </tr>
1445
+ </table>
1446
+ </div>
1447
+
1448
+ <div class="method_details ">
1449
+ <h3 class="signature " id="get_slice_zone-instance_method">
1450
+
1451
+ - (<tt>Object</tt>) <strong>get_slice_zone</strong>(field)
1452
+
1453
+
1454
+
1455
+
1456
+
1457
+ </h3><table class="source_code">
1458
+ <tr>
1459
+ <td>
1460
+ <pre class="lines">
1461
+
1462
+
1463
+ 153
1464
+ 154
1465
+ 155
1466
+ 156
1467
+ 157</pre>
1468
+ </td>
1469
+ <td>
1470
+ <pre class="code"><span class="info file"># File 'lib/prismic/with_fragments.rb', line 153</span>
1471
+
1472
+ <span class='kw'>def</span> <span class='id identifier rubyid_get_slice_zone'>get_slice_zone</span><span class='lparen'>(</span><span class='id identifier rubyid_field'>field</span><span class='rparen'>)</span>
1473
+ <span class='id identifier rubyid_fragment'>fragment</span> <span class='op'>=</span> <span class='kw'>self</span><span class='lbracket'>[</span><span class='id identifier rubyid_field'>field</span><span class='rbracket'>]</span>
1474
+ <span class='kw'>return</span> <span class='kw'>nil</span> <span class='kw'>unless</span> <span class='id identifier rubyid_fragment'>fragment</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span> <span class='const'>Prismic</span><span class='op'>::</span><span class='const'>Fragments</span><span class='op'>::</span><span class='const'>SliceZone</span>
1475
+ <span class='id identifier rubyid_fragment'>fragment</span>
1476
+ <span class='kw'>end</span></pre>
1477
+ </td>
1478
+ </tr>
1479
+ </table>
1480
+ </div>
1481
+
1482
+ <div class="method_details ">
1483
+ <h3 class="signature " id="get_structured_text-instance_method">
1484
+
1485
+ - (<tt><span class='object_link'><a href="Fragments/StructuredText.html" title="Prismic::Fragments::StructuredText (class)">Fragments::StructuredText</a></span></tt>) <strong>get_structured_text</strong>(field)
1486
+
1487
+
1488
+
1489
+
1490
+
1491
+ </h3><div class="docstring">
1492
+ <div class="discussion">
1493
+
1494
+
1495
+ </div>
1496
+ </div>
1497
+ <div class="tags">
1498
+
1499
+ <p class="tag_title">Returns:</p>
1500
+ <ul class="return">
1501
+
1502
+ <li>
1503
+
1504
+
1505
+ <span class='type'>(<tt><span class='object_link'><a href="Fragments/StructuredText.html" title="Prismic::Fragments::StructuredText (class)">Fragments::StructuredText</a></span></tt>)</span>
1506
+
1507
+
1508
+
1509
+ </li>
1510
+
1511
+ </ul>
1512
+
1513
+ </div><table class="source_code">
1514
+ <tr>
1515
+ <td>
1516
+ <pre class="lines">
1517
+
1518
+
1519
+ 77
1520
+ 78
1521
+ 79
1522
+ 80
1523
+ 81</pre>
1524
+ </td>
1525
+ <td>
1526
+ <pre class="code"><span class="info file"># File 'lib/prismic/with_fragments.rb', line 77</span>
1527
+
1528
+ <span class='kw'>def</span> <span class='id identifier rubyid_get_structured_text'>get_structured_text</span><span class='lparen'>(</span><span class='id identifier rubyid_field'>field</span><span class='rparen'>)</span>
1529
+ <span class='id identifier rubyid_fragment'>fragment</span> <span class='op'>=</span> <span class='kw'>self</span><span class='lbracket'>[</span><span class='id identifier rubyid_field'>field</span><span class='rbracket'>]</span>
1530
+ <span class='kw'>return</span> <span class='kw'>nil</span> <span class='kw'>unless</span> <span class='id identifier rubyid_fragment'>fragment</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span> <span class='const'>Prismic</span><span class='op'>::</span><span class='const'>Fragments</span><span class='op'>::</span><span class='const'>StructuredText</span>
1531
+ <span class='id identifier rubyid_fragment'>fragment</span>
1532
+ <span class='kw'>end</span></pre>
1533
+ </td>
1534
+ </tr>
1535
+ </table>
1536
+ </div>
1537
+
1538
+ <div class="method_details ">
1539
+ <h3 class="signature " id="get_text-instance_method">
1540
+
1541
+ - (<tt><span class='object_link'><a href="Fragments/Text.html" title="Prismic::Fragments::Text (class)">Fragments::Text</a></span></tt>) <strong>get_text</strong>(field)
1542
+
1543
+
1544
+
1545
+
1546
+
1547
+ </h3><div class="docstring">
1548
+ <div class="discussion">
1549
+
1550
+
1551
+ </div>
1552
+ </div>
1553
+ <div class="tags">
1554
+
1555
+ <p class="tag_title">Returns:</p>
1556
+ <ul class="return">
1557
+
1558
+ <li>
1559
+
1560
+
1561
+ <span class='type'>(<tt><span class='object_link'><a href="Fragments/Text.html" title="Prismic::Fragments::Text (class)">Fragments::Text</a></span></tt>)</span>
1562
+
1563
+
1564
+
1565
+ </li>
1566
+
1567
+ </ul>
1568
+
1569
+ </div><table class="source_code">
1570
+ <tr>
1571
+ <td>
1572
+ <pre class="lines">
1573
+
1574
+
1575
+ 84
1576
+ 85
1577
+ 86
1578
+ 87
1579
+ 88</pre>
1580
+ </td>
1581
+ <td>
1582
+ <pre class="code"><span class="info file"># File 'lib/prismic/with_fragments.rb', line 84</span>
1583
+
1584
+ <span class='kw'>def</span> <span class='id identifier rubyid_get_text'>get_text</span><span class='lparen'>(</span><span class='id identifier rubyid_field'>field</span><span class='rparen'>)</span>
1585
+ <span class='id identifier rubyid_fragment'>fragment</span> <span class='op'>=</span> <span class='kw'>self</span><span class='lbracket'>[</span><span class='id identifier rubyid_field'>field</span><span class='rbracket'>]</span>
1586
+ <span class='kw'>return</span> <span class='kw'>nil</span> <span class='kw'>unless</span> <span class='id identifier rubyid_fragment'>fragment</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span> <span class='const'>Prismic</span><span class='op'>::</span><span class='const'>Fragments</span><span class='op'>::</span><span class='const'>Text</span>
1587
+ <span class='id identifier rubyid_fragment'>fragment</span>
1588
+ <span class='kw'>end</span></pre>
1589
+ </td>
1590
+ </tr>
1591
+ </table>
1592
+ </div>
1593
+
1594
+ <div class="method_details ">
1595
+ <h3 class="signature " id="get_timestamp-instance_method">
1596
+
1597
+ - (<tt><span class='object_link'><a href="Fragments/Timestamp.html" title="Prismic::Fragments::Timestamp (class)">Fragments::Timestamp</a></span></tt>) <strong>get_timestamp</strong>(field)
1598
+
1599
+
1600
+
1601
+
1602
+
1603
+ </h3><div class="docstring">
1604
+ <div class="discussion">
1605
+
1606
+
1607
+ </div>
1608
+ </div>
1609
+ <div class="tags">
1610
+
1611
+ <p class="tag_title">Returns:</p>
1612
+ <ul class="return">
1613
+
1614
+ <li>
1615
+
1616
+
1617
+ <span class='type'>(<tt><span class='object_link'><a href="Fragments/Timestamp.html" title="Prismic::Fragments::Timestamp (class)">Fragments::Timestamp</a></span></tt>)</span>
1618
+
1619
+
1620
+
1621
+ </li>
1622
+
1623
+ </ul>
1624
+
1625
+ </div><table class="source_code">
1626
+ <tr>
1627
+ <td>
1628
+ <pre class="lines">
1629
+
1630
+
1631
+ 112
1632
+ 113
1633
+ 114
1634
+ 115
1635
+ 116</pre>
1636
+ </td>
1637
+ <td>
1638
+ <pre class="code"><span class="info file"># File 'lib/prismic/with_fragments.rb', line 112</span>
1639
+
1640
+ <span class='kw'>def</span> <span class='id identifier rubyid_get_timestamp'>get_timestamp</span><span class='lparen'>(</span><span class='id identifier rubyid_field'>field</span><span class='rparen'>)</span>
1641
+ <span class='id identifier rubyid_fragment'>fragment</span> <span class='op'>=</span> <span class='kw'>self</span><span class='lbracket'>[</span><span class='id identifier rubyid_field'>field</span><span class='rbracket'>]</span>
1642
+ <span class='kw'>return</span> <span class='kw'>nil</span> <span class='kw'>unless</span> <span class='id identifier rubyid_fragment'>fragment</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span> <span class='const'>Prismic</span><span class='op'>::</span><span class='const'>Fragments</span><span class='op'>::</span><span class='const'>Timestamp</span>
1643
+ <span class='id identifier rubyid_fragment'>fragment</span>
1644
+ <span class='kw'>end</span></pre>
1645
+ </td>
1646
+ </tr>
1647
+ </table>
1648
+ </div>
1649
+
1650
+ <div class="method_details ">
1651
+ <h3 class="signature " id="length-instance_method">
1652
+
1653
+ - (<tt>Fixum</tt>) <strong>length</strong>
1654
+
1655
+
1656
+
1657
+ <span class="aliases">Also known as:
1658
+ <span class="names"><span id='size-instance_method'>size</span></span>
1659
+ </span>
1660
+
1661
+
1662
+
1663
+ </h3><div class="docstring">
1664
+ <div class="discussion">
1665
+
1666
+
1667
+ </div>
1668
+ </div>
1669
+ <div class="tags">
1670
+
1671
+ <p class="tag_title">Returns:</p>
1672
+ <ul class="return">
1673
+
1674
+ <li>
1675
+
1676
+
1677
+ <span class='type'>(<tt>Fixum</tt>)</span>
1678
+
1679
+
1680
+
1681
+ </li>
1682
+
1683
+ </ul>
1684
+
1685
+ </div><table class="source_code">
1686
+ <tr>
1687
+ <td>
1688
+ <pre class="lines">
1689
+
1690
+
1691
+ 71
1692
+ 72
1693
+ 73</pre>
1694
+ </td>
1695
+ <td>
1696
+ <pre class="code"><span class="info file"># File 'lib/prismic/with_fragments.rb', line 71</span>
1697
+
1698
+ <span class='kw'>def</span> <span class='id identifier rubyid_length'>length</span>
1699
+ <span class='ivar'>@fragments</span><span class='period'>.</span><span class='id identifier rubyid_length'>length</span>
1700
+ <span class='kw'>end</span></pre>
1701
+ </td>
1702
+ </tr>
1703
+ </table>
1704
+ </div>
1705
+
1706
+ <div class="method_details ">
1707
+ <h3 class="signature " id="linked_documents-instance_method">
1708
+
1709
+ - (<tt>Array&lt;LinkedDocument&gt;</tt>) <strong>linked_documents</strong>
1710
+
1711
+
1712
+
1713
+
1714
+
1715
+ </h3><div class="docstring">
1716
+ <div class="discussion">
1717
+
1718
+
1719
+ </div>
1720
+ </div>
1721
+ <div class="tags">
1722
+
1723
+ <p class="tag_title">Returns:</p>
1724
+ <ul class="return">
1725
+
1726
+ <li>
1727
+
1728
+
1729
+ <span class='type'>(<tt>Array&lt;LinkedDocument&gt;</tt>)</span>
1730
+
1731
+
1732
+
1733
+ </li>
1734
+
1735
+ </ul>
1736
+
1737
+ </div><table class="source_code">
1738
+ <tr>
1739
+ <td>
1740
+ <pre class="lines">
1741
+
1742
+
1743
+ 160
1744
+ 161
1745
+ 162
1746
+ 163
1747
+ 164
1748
+ 165
1749
+ 166
1750
+ 167
1751
+ 168
1752
+ 169
1753
+ 170
1754
+ 171
1755
+ 172
1756
+ 173
1757
+ 174
1758
+ 175
1759
+ 176
1760
+ 177
1761
+ 178
1762
+ 179</pre>
1763
+ </td>
1764
+ <td>
1765
+ <pre class="code"><span class="info file"># File 'lib/prismic/with_fragments.rb', line 160</span>
1766
+
1767
+ <span class='kw'>def</span> <span class='id identifier rubyid_linked_documents'>linked_documents</span>
1768
+ <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_fragments'>fragments</span><span class='period'>.</span><span class='id identifier rubyid_map'>map</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_name'>name</span><span class='comma'>,</span> <span class='id identifier rubyid_fragment'>fragment</span><span class='op'>|</span>
1769
+ <span class='kw'>if</span> <span class='id identifier rubyid_fragment'>fragment</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span> <span class='const'>Prismic</span><span class='op'>::</span><span class='const'>Fragments</span><span class='op'>::</span><span class='const'>DocumentLink</span>
1770
+ <span class='lbracket'>[</span><span class='id identifier rubyid_fragment'>fragment</span><span class='rbracket'>]</span>
1771
+ <span class='kw'>elsif</span> <span class='id identifier rubyid_fragment'>fragment</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span> <span class='const'>Prismic</span><span class='op'>::</span><span class='const'>Fragments</span><span class='op'>::</span><span class='const'>StructuredText</span>
1772
+ <span class='id identifier rubyid_fragment'>fragment</span><span class='period'>.</span><span class='id identifier rubyid_blocks'>blocks</span><span class='period'>
1773
+ </span><span class='id identifier rubyid_ .select'> .select</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_block'>block</span><span class='op'>|</span> <span class='id identifier rubyid_block'>block</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span> <span class='const'>Prismic</span><span class='op'>::</span><span class='const'>Fragments</span><span class='op'>::</span><span class='const'>StructuredText</span><span class='op'>::</span><span class='const'>Block</span><span class='op'>::</span><span class='const'>Text</span><span class='rbrace'>}</span><span class='period'>
1774
+ </span><span class='id identifier rubyid_ .map'> .map</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_block'>block</span><span class='op'>|</span> <span class='id identifier rubyid_block'>block</span><span class='period'>.</span><span class='id identifier rubyid_spans'>spans</span> <span class='rbrace'>}</span><span class='period'>.</span><span class='id identifier rubyid_flatten'>flatten</span><span class='period'>
1775
+ </span><span class='id identifier rubyid_ .select'> .select</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_span'>span</span><span class='op'>|</span> <span class='id identifier rubyid_span'>span</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span> <span class='const'>Prismic</span><span class='op'>::</span><span class='const'>Fragments</span><span class='op'>::</span><span class='const'>StructuredText</span><span class='op'>::</span><span class='const'>Span</span><span class='op'>::</span><span class='const'>Hyperlink</span> <span class='rbrace'>}</span><span class='period'>
1776
+ </span><span class='id identifier rubyid_ .map'> .map</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_span'>span</span><span class='op'>|</span> <span class='id identifier rubyid_span'>span</span><span class='period'>.</span><span class='id identifier rubyid_link'>link</span> <span class='rbrace'>}</span><span class='period'>
1777
+ </span><span class='id identifier rubyid_ .select'> .select</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_link'>link</span><span class='op'>|</span> <span class='id identifier rubyid_link'>link</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span> <span class='const'>Prismic</span><span class='op'>::</span><span class='const'>Fragments</span><span class='op'>::</span><span class='const'>DocumentLink</span> <span class='rbrace'>}</span>
1778
+ <span class='kw'>elsif</span> <span class='id identifier rubyid_fragment'>fragment</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span> <span class='const'>Prismic</span><span class='op'>::</span><span class='const'>Fragments</span><span class='op'>::</span><span class='const'>Group</span>
1779
+ <span class='id identifier rubyid_fragment'>fragment</span><span class='period'>.</span><span class='id identifier rubyid_group_documents'>group_documents</span><span class='period'>
1780
+ </span><span class='id identifier rubyid_ .map'> .map</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_groupDoc'>groupDoc</span><span class='op'>|</span> <span class='id identifier rubyid_groupDoc'>groupDoc</span><span class='period'>.</span><span class='id identifier rubyid_linked_documents'>linked_documents</span> <span class='rbrace'>}</span><span class='period'>
1781
+ </span><span class='id identifier rubyid_ .flatten'> .flatten</span>
1782
+ <span class='kw'>else</span>
1783
+ <span class='lbracket'>[</span><span class='rbracket'>]</span>
1784
+ <span class='kw'>end</span>
1785
+ <span class='rbrace'>}</span><span class='period'>.</span><span class='id identifier rubyid_flatten'>flatten</span>
1786
+ <span class='kw'>end</span></pre>
1787
+ </td>
1788
+ </tr>
1789
+ </table>
1790
+ </div>
1791
+
1792
+ </div>
1793
+
1794
+ </div>
1795
+
1796
+ <div id="footer">
1797
+ Generated on Tue Sep 27 10:47:05 2016 by
1798
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
1799
+ 0.8.7.4 (ruby-2.0.0).
1800
+ </div>
1801
+
1802
+ </body>
1803
+ </html>