Class: Prismic::HtmlSerializer
- Inherits:
-
Object
- Object
- Prismic::HtmlSerializer
- Defined in:
- lib/prismic.rb
Overview
A class to override the default was to serialize HTML. Only needed if you want to override the default HTML serialization.
The html_serializer function is the recommended way to create an HtmlSerializer.
Instance Method Summary collapse
-
#initialize(&blk) ⇒ HtmlSerializer
constructor
A new instance of HtmlSerializer.
- #serialize(element, content) ⇒ Object
Constructor Details
#initialize(&blk) ⇒ HtmlSerializer
Returns a new instance of HtmlSerializer
562 563 564 |
# File 'lib/prismic.rb', line 562 def initialize(&blk) @blk = blk end |
Instance Method Details
#serialize(element, content) ⇒ Object
566 567 568 |
# File 'lib/prismic.rb', line 566 def serialize(element, content) @blk.call(element, content) end |