Class: SdrViewComponents::Elements::HorizontalRuleComponent
- Inherits:
-
BaseComponent
- Object
- ViewComponent::Base
- BaseComponent
- SdrViewComponents::Elements::HorizontalRuleComponent
- Defined in:
- app/components/sdr_view_components/elements/horizontal_rule_component.rb
Overview
Component for a horizontal rule (line).
Instance Method Summary collapse
- #call ⇒ Object
- #classes ⇒ Object
-
#initialize(classes: []) ⇒ HorizontalRuleComponent
constructor
A new instance of HorizontalRuleComponent.
Methods inherited from BaseComponent
#args_for, #merge_actions, #merge_classes
Constructor Details
#initialize(classes: []) ⇒ HorizontalRuleComponent
Returns a new instance of HorizontalRuleComponent.
7 8 9 10 |
# File 'app/components/sdr_view_components/elements/horizontal_rule_component.rb', line 7 def initialize(classes: []) @classes = classes super() end |
Instance Method Details
#call ⇒ Object
12 13 14 |
# File 'app/components/sdr_view_components/elements/horizontal_rule_component.rb', line 12 def call tag.hr class: classes end |
#classes ⇒ Object
16 17 18 |
# File 'app/components/sdr_view_components/elements/horizontal_rule_component.rb', line 16 def classes merge_classes(@classes) end |