Class: Prismic::Fragments::StructuredText::Block::Embed
- Inherits:
-
Prismic::Fragments::StructuredText::Block
- Object
- Prismic::Fragments::StructuredText::Block
- Prismic::Fragments::StructuredText::Block::Embed
- Defined in:
- lib/prismic/fragments/structured_text.rb
Instance Attribute Summary collapse
-
#label ⇒ Object
Returns the value of attribute label.
Instance Method Summary collapse
- #as_html(link_resolver, html_serializer = nil) ⇒ Object
-
#initialize(embed, label) ⇒ Embed
constructor
A new instance of Embed.
Methods inherited from Prismic::Fragments::StructuredText::Block
Constructor Details
#initialize(embed, label) ⇒ Embed
Returns a new instance of Embed
375 376 377 378 |
# File 'lib/prismic/fragments/structured_text.rb', line 375 def initialize(, label) @embed = @label = label end |
Instance Attribute Details
#label ⇒ Object
Returns the value of attribute label
373 374 375 |
# File 'lib/prismic/fragments/structured_text.rb', line 373 def label @label end |
Instance Method Details
#as_html(link_resolver, html_serializer = nil) ⇒ Object
380 381 382 383 384 385 386 387 388 389 390 |
# File 'lib/prismic/fragments/structured_text.rb', line 380 def as_html(link_resolver, html_serializer = nil) custom = nil unless html_serializer.nil? custom = html_serializer.serialize(self, '') end if custom.nil? .as_html(link_resolver) else custom end end |