Class: Prismic::Fragments::StructuredText::BlockGroup
- Inherits:
-
Object
- Object
- Prismic::Fragments::StructuredText::BlockGroup
- Defined in:
- lib/prismic/fragments/structured_text.rb
Overview
Used during the call of #as_html : blocks are first gathered by groups, so that list items of the same list are placed within the same group, allowing to frame their serialization with
- ...
- ...
Instance Attribute Summary (collapse)
-
- (Object) blocks
readonly
Returns the value of attribute blocks.
-
- (Object) kind
readonly
Returns the value of attribute kind.
Instance Method Summary (collapse)
- - (Object) <<(block)
-
- (BlockGroup) initialize(kind)
constructor
A new instance of BlockGroup.
Constructor Details
- (BlockGroup) initialize(kind)
Returns a new instance of BlockGroup
12 13 14 15 |
# File 'lib/prismic/fragments/structured_text.rb', line 12 def initialize(kind) @kind = kind @blocks = [] end |
Instance Attribute Details
- (Object) blocks (readonly)
Returns the value of attribute blocks
11 12 13 |
# File 'lib/prismic/fragments/structured_text.rb', line 11 def blocks @blocks end |
- (Object) kind (readonly)
Returns the value of attribute kind
11 12 13 |
# File 'lib/prismic/fragments/structured_text.rb', line 11 def kind @kind end |
Instance Method Details
- (Object) <<(block)
16 17 18 |
# File 'lib/prismic/fragments/structured_text.rb', line 16 def <<(block) blocks << block end |