Class: Geoblacklight::LoginLinkComponent
- Inherits:
-
ViewComponent::Base
- Object
- ViewComponent::Base
- Geoblacklight::LoginLinkComponent
- Defined in:
- app/components/geoblacklight/login_link_component.rb
Overview
Display login link
Instance Attribute Summary collapse
-
#document ⇒ Object
readonly
Returns the value of attribute document.
Instance Method Summary collapse
-
#initialize(document:) ⇒ LoginLinkComponent
constructor
A new instance of LoginLinkComponent.
- #render? ⇒ Boolean
Constructor Details
#initialize(document:) ⇒ LoginLinkComponent
Returns a new instance of LoginLinkComponent.
8 9 10 11 |
# File 'app/components/geoblacklight/login_link_component.rb', line 8 def initialize(document:) @document = document super() end |
Instance Attribute Details
#document ⇒ Object (readonly)
Returns the value of attribute document.
6 7 8 |
# File 'app/components/geoblacklight/login_link_component.rb', line 6 def document @document end |
Instance Method Details
#render? ⇒ Boolean
13 14 15 |
# File 'app/components/geoblacklight/login_link_component.rb', line 13 def render? document.restricted? && document.same_institution? && !helpers.document_available? end |