Class: Arclight::OnlineContentFilterComponent

Inherits:
Blacklight::Component
  • Object
show all
Defined in:
app/components/arclight/online_content_filter_component.rb

Overview

Render the box that displays a link to filter only for online content

Instance Method Summary collapse

Constructor Details

#initialize(document:) ⇒ OnlineContentFilterComponent

Returns a new instance of OnlineContentFilterComponent.



6
7
8
9
# File 'app/components/arclight/online_content_filter_component.rb', line 6

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

Instance Method Details

#collection_nameObject



15
16
17
# File 'app/components/arclight/online_content_filter_component.rb', line 15

def collection_name
  @document.collection_name
end

#render?Boolean

Returns:

  • (Boolean)


11
12
13
# File 'app/components/arclight/online_content_filter_component.rb', line 11

def render?
  @document.collection? && @document.online_content?
end