Class: Spotlight::SolrDocumentLegacyEmbedComponent

Inherits:
Blacklight::DocumentComponent
  • Object
show all
Defined in:
app/components/spotlight/solr_document_legacy_embed_component.rb

Overview

Render an document suitable for embedding on a feature page.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(*args, block: nil, **kwargs) ⇒ SolrDocumentLegacyEmbedComponent

Returns a new instance of SolrDocumentLegacyEmbedComponent.



8
9
10
11
12
# File 'app/components/spotlight/solr_document_legacy_embed_component.rb', line 8

def initialize(*args, block: nil, **kwargs)
  super

  @block_context = block
end

Instance Attribute Details

#block_contextObject (readonly)

Returns the value of attribute block_context.



6
7
8
# File 'app/components/spotlight/solr_document_legacy_embed_component.rb', line 6

def block_context
  @block_context
end

Instance Method Details

#before_renderObject



14
15
16
17
18
# File 'app/components/spotlight/solr_document_legacy_embed_component.rb', line 14

def before_render
  set_slot(:embed, nil, block_context:) unless embed

  super
end