Class: GovukComponent::BreadcrumbsComponent
- Defined in:
- app/components/govuk_component/breadcrumbs_component.rb
Instance Attribute Summary collapse
-
#breadcrumbs ⇒ Object
readonly
Returns the value of attribute breadcrumbs.
-
#collapse_on_mobile ⇒ Object
readonly
Returns the value of attribute collapse_on_mobile.
-
#hide_in_print ⇒ Object
readonly
Returns the value of attribute hide_in_print.
-
#inverse ⇒ Object
readonly
Returns the value of attribute inverse.
Attributes inherited from Base
Instance Method Summary collapse
-
#initialize(breadcrumbs:, hide_in_print: config.default_breadcrumbs_hide_in_print, collapse_on_mobile: config.default_breadcrumbs_collapse_on_mobile, inverse: false, classes: [], html_attributes: {}) ⇒ BreadcrumbsComponent
constructor
A new instance of BreadcrumbsComponent.
Methods inherited from Base
Constructor Details
#initialize(breadcrumbs:, hide_in_print: config.default_breadcrumbs_hide_in_print, collapse_on_mobile: config.default_breadcrumbs_collapse_on_mobile, inverse: false, classes: [], html_attributes: {}) ⇒ BreadcrumbsComponent
Returns a new instance of BreadcrumbsComponent.
4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
# File 'app/components/govuk_component/breadcrumbs_component.rb', line 4 def initialize(breadcrumbs:, hide_in_print: config., collapse_on_mobile: config., inverse: false, classes: [], html_attributes: {}) @breadcrumbs = build_list() @hide_in_print = hide_in_print @collapse_on_mobile = collapse_on_mobile @inverse = inverse super(classes:, html_attributes:) end |
Instance Attribute Details
#breadcrumbs ⇒ Object (readonly)
Returns the value of attribute breadcrumbs.
2 3 4 |
# File 'app/components/govuk_component/breadcrumbs_component.rb', line 2 def @breadcrumbs end |
#collapse_on_mobile ⇒ Object (readonly)
Returns the value of attribute collapse_on_mobile.
2 3 4 |
# File 'app/components/govuk_component/breadcrumbs_component.rb', line 2 def collapse_on_mobile @collapse_on_mobile end |
#hide_in_print ⇒ Object (readonly)
Returns the value of attribute hide_in_print.
2 3 4 |
# File 'app/components/govuk_component/breadcrumbs_component.rb', line 2 def hide_in_print @hide_in_print end |
#inverse ⇒ Object (readonly)
Returns the value of attribute inverse.
2 3 4 |
# File 'app/components/govuk_component/breadcrumbs_component.rb', line 2 def inverse @inverse end |