Class: Prismic::Fragments::StructuredText::Block::Preformatted
- Defined in:
- lib/prismic/fragments/structured_text.rb
Instance Attribute Summary
Attributes inherited from 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
294 295 296 297 298 299 300 301 |
# File 'lib/prismic/fragments/structured_text.rb', line 294 def as_html(link_resolver=nil, html_serializer=nil) custom_html = html_serializer && html_serializer.serialize(self, super) if custom_html.nil? %(<pre#{class_code}>#{super}</pre>) else custom_html end end |