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
-
#embed ⇒ Object
Returns the value of attribute embed.
-
#label ⇒ Object
Returns the value of attribute label.
Instance Method Summary collapse
- #as_html(link_resolver, html_serializer = nil) ⇒ Object
- #embed_type ⇒ Object
- #html ⇒ Object
-
#initialize(embed, label) ⇒ Embed
constructor
A new instance of Embed.
- #provider ⇒ Object
- #url ⇒ Object
Methods inherited from Prismic::Fragments::StructuredText::Block
Constructor Details
#initialize(embed, label) ⇒ Embed
Returns a new instance of Embed.
377 378 379 380 |
# File 'lib/prismic/fragments/structured_text.rb', line 377 def initialize(, label) @embed = @label = label end |
Instance Attribute Details
#embed ⇒ Object
Returns the value of attribute embed.
375 376 377 |
# File 'lib/prismic/fragments/structured_text.rb', line 375 def @embed end |
#label ⇒ Object
Returns the value of attribute label.
375 376 377 |
# File 'lib/prismic/fragments/structured_text.rb', line 375 def label @label end |
Instance Method Details
#as_html(link_resolver, html_serializer = nil) ⇒ Object
398 399 400 401 402 403 404 405 406 407 408 |
# File 'lib/prismic/fragments/structured_text.rb', line 398 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 |
#embed_type ⇒ Object
382 383 384 |
# File 'lib/prismic/fragments/structured_text.rb', line 382 def @embed. end |
#html ⇒ Object
394 395 396 |
# File 'lib/prismic/fragments/structured_text.rb', line 394 def html @embed.html end |
#provider ⇒ Object
386 387 388 |
# File 'lib/prismic/fragments/structured_text.rb', line 386 def provider @embed.provider end |
#url ⇒ Object
390 391 392 |
# File 'lib/prismic/fragments/structured_text.rb', line 390 def url @embed.url end |