Class: Geoblacklight::WebServicesLinkComponent
- Inherits:
-
ViewComponent::Base
- Object
- ViewComponent::Base
- Geoblacklight::WebServicesLinkComponent
- Defined in:
- app/components/geoblacklight/web_services_link_component.rb
Instance Attribute Summary collapse
-
#document ⇒ Object
readonly
Returns the value of attribute document.
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(document:) ⇒ WebServicesLinkComponent
constructor
A new instance of WebServicesLinkComponent.
- #key ⇒ Object
Constructor Details
#initialize(document:) ⇒ WebServicesLinkComponent
Returns a new instance of WebServicesLinkComponent.
7 8 9 10 |
# File 'app/components/geoblacklight/web_services_link_component.rb', line 7 def initialize(document:, **) @document = document super() end |
Instance Attribute Details
#document ⇒ Object (readonly)
Returns the value of attribute document.
5 6 7 |
# File 'app/components/geoblacklight/web_services_link_component.rb', line 5 def document @document end |
Instance Method Details
#call ⇒ Object
12 13 14 15 16 17 18 19 |
# File 'app/components/geoblacklight/web_services_link_component.rb', line 12 def call link_to( "Web services", helpers.web_services_solr_document_path(id: document.id), class: "nav-link", data: {blacklight_modal: "trigger"} ) end |
#key ⇒ Object
21 22 23 |
# File 'app/components/geoblacklight/web_services_link_component.rb', line 21 def key "web_services" end |