Class: Prismic::Fragments::GroupDocument
- Inherits:
-
Object
- Object
- Prismic::Fragments::GroupDocument
- Includes:
- WithFragments
- Defined in:
- lib/prismic/fragments/group.rb
Instance Attribute Summary collapse
-
#fragments ⇒ Object
Returns the value of attribute fragments.
Instance Method Summary collapse
-
#[](field) ⇒ Fragments::Fragment
(also: #get)
Get a document's field.
-
#initialize(fragments) ⇒ GroupDocument
constructor
A new instance of GroupDocument.
Methods included from WithFragments
#as_html, #as_text, #each, #first_title, #get_color, #get_date, #get_embed, #get_geopoint, #get_group, #get_image, #get_link, #get_number, #get_slice_zone, #get_structured_text, #get_text, #get_timestamp, #length, #linked_documents
Constructor Details
#initialize(fragments) ⇒ GroupDocument
Returns a new instance of GroupDocument
9 10 11 |
# File 'lib/prismic/fragments/group.rb', line 9 def initialize(fragments) @fragments = fragments end |
Instance Attribute Details
#fragments ⇒ Object
Returns the value of attribute fragments
7 8 9 |
# File 'lib/prismic/fragments/group.rb', line 7 def fragments @fragments end |
Instance Method Details
#[](field) ⇒ Fragments::Fragment Also known as: get
Get a document's field
15 16 17 |
# File 'lib/prismic/fragments/group.rb', line 15 def [](field) @fragments[field] end |