Class: Geoblacklight::Document::PreviewComponent

Inherits:
ViewComponent::Base
  • Object
show all
Defined in:
app/components/geoblacklight/document/preview_component.rb

Instance Method Summary collapse

Constructor Details

#initialize(document:) ⇒ PreviewComponent

Returns a new instance of PreviewComponent.



4
5
6
7
# File 'app/components/geoblacklight/document/preview_component.rb', line 4

def initialize(document:)
  @document = document
  super()
end

Instance Method Details

#render?Boolean

Returns:

  • (Boolean)


9
10
11
# File 'app/components/geoblacklight/document/preview_component.rb', line 9

def render?
  @document.previewable?
end