Class: Blacklight::MetadataFieldPlainTextLayoutComponent
- Inherits:
-
MetadataFieldLayoutComponent
- Object
- ViewComponent::Base
- Component
- MetadataFieldLayoutComponent
- Blacklight::MetadataFieldPlainTextLayoutComponent
- Defined in:
- app/components/blacklight/metadata_field_plain_text_layout_component.rb
Constant Summary
Constants inherited from Component
Instance Method Summary collapse
-
#call ⇒ Object
rubocop:disable Rails/OutputSafety.
-
#initialize(field:, **kwargs) ⇒ MetadataFieldPlainTextLayoutComponent
constructor
A new instance of MetadataFieldPlainTextLayoutComponent.
Methods inherited from Component
Constructor Details
#initialize(field:, **kwargs) ⇒ MetadataFieldPlainTextLayoutComponent
Returns a new instance of MetadataFieldPlainTextLayoutComponent.
7 8 9 |
# File 'app/components/blacklight/metadata_field_plain_text_layout_component.rb', line 7 def initialize(field:, **kwargs) super(field: field, **kwargs, value_tag: nil) end |
Instance Method Details
#call ⇒ Object
rubocop:disable Rails/OutputSafety
12 13 14 |
# File 'app/components/blacklight/metadata_field_plain_text_layout_component.rb', line 12 def call [label.to_s.strip, helpers.(CGI.unescape_html(safe_join(values, "\n")).strip)].compact.join(' ').html_safe end |