Class: Blacklight::Document::SidebarComponent

Inherits:
Component
  • Object
show all
Defined in:
app/components/blacklight/document/sidebar_component.rb

Overview

Render the sidebar on the show view

Constant Summary

Constants inherited from Component

Component::EXCLUDE_VARIABLES

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Component

compiler, config, #inspect

Constructor Details

#initialize(presenter:) ⇒ SidebarComponent

Returns a new instance of SidebarComponent.

Parameters:



8
9
10
11
# File 'app/components/blacklight/document/sidebar_component.rb', line 8

def initialize(presenter:)
  @presenter = presenter
  @document = presenter.document
end

Instance Attribute Details

#documentObject (readonly)

Returns the value of attribute document.



13
14
15
# File 'app/components/blacklight/document/sidebar_component.rb', line 13

def document
  @document
end