Class: GovukComponent::SectionBreakComponent

Inherits:
Base
  • Object
show all
Defined in:
app/components/govuk_component/section_break_component.rb

Constant Summary collapse

SIZES =
%w(m l xl).freeze

Instance Attribute Summary

Attributes inherited from Base

#html_attributes

Instance Method Summary collapse

Constructor Details

#initialize(visible: false, size: nil, classes: [], html_attributes: {}) ⇒ SectionBreakComponent

Returns a new instance of SectionBreakComponent.



4
5
6
7
8
9
# File 'app/components/govuk_component/section_break_component.rb', line 4

def initialize(visible: false, size: nil, classes: [], html_attributes: {})
  @visible = visible
  @size    = size

  super(classes: classes, html_attributes: html_attributes)
end

Instance Method Details

#callObject



11
12
13
# File 'app/components/govuk_component/section_break_component.rb', line 11

def call
  tag.hr(**html_attributes)
end