class Prismic::Fragments::StructuredText::BlockGroup
Used during the call of {StructuredText#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 <ul>…</ul> or <ol>…</ol>. Images, paragraphs, headings, embed, … are then placed alone in their own BlockGroup
.
Attributes
blocks[R]
kind[R]
Public Class Methods
new(kind)
click to toggle source
# File lib/prismic/fragments/structured_text.rb, line 12 def initialize(kind) @kind = kind @blocks = [] end
Public Instance Methods
<<(block)
click to toggle source
# File lib/prismic/fragments/structured_text.rb, line 16 def <<(block) blocks << block end