Class: Blacklight::Document::MoreLikeThisComponent
- Inherits:
-
Component
- Object
- ViewComponent::Base
- Component
- Blacklight::Document::MoreLikeThisComponent
- Defined in:
- app/components/blacklight/document/more_like_this_component.rb
Overview
Render the ‘more like this’ results from the response
Constant Summary
Constants inherited from Component
Instance Method Summary collapse
-
#initialize(document:) ⇒ MoreLikeThisComponent
constructor
A new instance of MoreLikeThisComponent.
- #link_to_document(*args) ⇒ Object
- #render? ⇒ Boolean
Methods inherited from Component
Constructor Details
#initialize(document:) ⇒ MoreLikeThisComponent
Returns a new instance of MoreLikeThisComponent.
10 11 12 |
# File 'app/components/blacklight/document/more_like_this_component.rb', line 10 def initialize(document:) @document = document end |
Instance Method Details
#link_to_document(*args) ⇒ Object
18 19 20 |
# File 'app/components/blacklight/document/more_like_this_component.rb', line 18 def link_to_document(*args) helpers.link_to_document(*args) end |
#render? ⇒ Boolean
14 15 16 |
# File 'app/components/blacklight/document/more_like_this_component.rb', line 14 def render? @document.more_like_this.present? end |