Class: Geoblacklight::RelationsComponent
- Inherits:
-
ViewComponent::Base
- Object
- ViewComponent::Base
- Geoblacklight::RelationsComponent
- Defined in:
- app/components/geoblacklight/relations_component.rb
Overview
Display expandable file download links in sidebar
Instance Attribute Summary collapse
-
#rel_type_info ⇒ Object
readonly
Returns the value of attribute rel_type_info.
-
#relations ⇒ Object
readonly
Returns the value of attribute relations.
-
#relationship_type ⇒ Object
readonly
Returns the value of attribute relationship_type.
Instance Method Summary collapse
-
#initialize(relations:, relationship_type:, rel_type_info:) ⇒ RelationsComponent
constructor
A new instance of RelationsComponent.
- #render? ⇒ Boolean
Constructor Details
#initialize(relations:, relationship_type:, rel_type_info:) ⇒ RelationsComponent
Returns a new instance of RelationsComponent.
8 9 10 11 12 13 |
# File 'app/components/geoblacklight/relations_component.rb', line 8 def initialize(relations:, relationship_type:, rel_type_info:) @relations = relations @relationship_type = relationship_type @rel_type_info = rel_type_info super() end |
Instance Attribute Details
#rel_type_info ⇒ Object (readonly)
Returns the value of attribute rel_type_info.
6 7 8 |
# File 'app/components/geoblacklight/relations_component.rb', line 6 def rel_type_info @rel_type_info end |
#relations ⇒ Object (readonly)
Returns the value of attribute relations.
6 7 8 |
# File 'app/components/geoblacklight/relations_component.rb', line 6 def relations @relations end |
#relationship_type ⇒ Object (readonly)
Returns the value of attribute relationship_type.
6 7 8 |
# File 'app/components/geoblacklight/relations_component.rb', line 6 def relationship_type @relationship_type end |
Instance Method Details
#render? ⇒ Boolean
15 16 17 |
# File 'app/components/geoblacklight/relations_component.rb', line 15 def render? relationship_type_results["numFound"].to_i.positive? end |