Class: Geoblacklight::Document::CitationComponent

Inherits:
Blacklight::Document::CitationComponent
  • Object
show all
Defined in:
app/components/geoblacklight/document/citation_component.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(document:) ⇒ CitationComponent

Returns a new instance of CitationComponent.



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

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

Instance Attribute Details

#documentObject (readonly)

Returns the value of attribute document.



6
7
8
# File 'app/components/geoblacklight/document/citation_component.rb', line 6

def document
  @document
end

Instance Method Details

#citationObject



14
15
16
# File 'app/components/geoblacklight/document/citation_component.rb', line 14

def citation
  document.geoblacklight_citation(solr_document_url(document))
end