Class: Spotlight::Translations::SubheadingComponent
- Inherits:
-
ViewComponent::Base
- Object
- ViewComponent::Base
- Spotlight::Translations::SubheadingComponent
- Defined in:
- app/components/spotlight/translations/subheading_component.rb
Overview
Draws a sub-heading for a translation.
Instance Method Summary collapse
-
#initialize(key:) ⇒ SubheadingComponent
constructor
A new instance of SubheadingComponent.
- #text ⇒ Object
Constructor Details
#initialize(key:) ⇒ SubheadingComponent
Returns a new instance of SubheadingComponent.
7 8 9 10 |
# File 'app/components/spotlight/translations/subheading_component.rb', line 7 def initialize(key:) @key = key super end |
Instance Method Details
#text ⇒ Object
12 13 14 |
# File 'app/components/spotlight/translations/subheading_component.rb', line 12 def text t(@key, scope: 'spotlight.translations') end |