Class: Blacklight::Document::MoreLikeThisComponent

Inherits:
Component
  • Object
show all
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

Component::EXCLUDE_VARIABLES

Instance Method Summary collapse

Methods inherited from Component

compiler, config, #inspect

Constructor Details

#initialize(document:) ⇒ MoreLikeThisComponent

Returns a new instance of MoreLikeThisComponent.

Parameters:



10
11
12
# File 'app/components/blacklight/document/more_like_this_component.rb', line 10

def initialize(document:)
  @document = document
end

Instance Method Details



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

Returns:

  • (Boolean)


14
15
16
# File 'app/components/blacklight/document/more_like_this_component.rb', line 14

def render?
  @document.more_like_this.present?
end