Class: Prismic::Fragments::StructuredText::Block::Paragraph

Inherits:
Text
  • Object
show all
Defined in:
lib/prismic/fragments/structured_text.rb

Instance Attribute Summary

Attributes inherited from Text

#label, #spans, #text

Instance Method Summary collapse

Methods inherited from Text

#as_text, #initialize, #prepare_spans, #serialize

Constructor Details

This class inherits a constructor from Prismic::Fragments::StructuredText::Block::Text

Instance Method Details

#as_html(link_resolver = nil, html_serializer = nil) ⇒ Object



285
286
287
288
289
290
291
292
# File 'lib/prismic/fragments/structured_text.rb', line 285

def as_html(link_resolver=nil, html_serializer=nil)
  custom_html = html_serializer && html_serializer.serialize(self, super)
  if custom_html.nil?
    %(<p#{class_code}>#{super}</p>)
  else
    custom_html
  end
end