Class: Geoblacklight::Document::PreviewComponent
- Inherits:
-
ViewComponent::Base
- Object
- ViewComponent::Base
- Geoblacklight::Document::PreviewComponent
- Defined in:
- app/components/geoblacklight/document/preview_component.rb
Instance Method Summary collapse
-
#initialize(document:) ⇒ PreviewComponent
constructor
A new instance of PreviewComponent.
- #render? ⇒ Boolean
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
9 10 11 |
# File 'app/components/geoblacklight/document/preview_component.rb', line 9 def render? @document.previewable? end |