Class: GovukPublishingComponents::Presenters::BreadcrumbSelector
- Inherits:
-
Object
- Object
- GovukPublishingComponents::Presenters::BreadcrumbSelector
- Defined in:
- lib/govuk_publishing_components/presenters/breadcrumb_selector.rb
Instance Attribute Summary collapse
-
#content_item ⇒ Object
readonly
Returns the value of attribute content_item.
-
#prioritise_taxon_breadcrumbs ⇒ Object
readonly
Returns the value of attribute prioritise_taxon_breadcrumbs.
-
#request ⇒ Object
readonly
Returns the value of attribute request.
Instance Method Summary collapse
- #breadcrumbs ⇒ Object
-
#initialize(content_item, request, prioritise_taxon_breadcrumbs, disable_ga4) ⇒ BreadcrumbSelector
constructor
A new instance of BreadcrumbSelector.
- #step_by_step ⇒ Object
Constructor Details
#initialize(content_item, request, prioritise_taxon_breadcrumbs, disable_ga4) ⇒ BreadcrumbSelector
Returns a new instance of BreadcrumbSelector.
6 7 8 9 10 11 |
# File 'lib/govuk_publishing_components/presenters/breadcrumb_selector.rb', line 6 def initialize(content_item, request, , disable_ga4) @content_item = content_item @request = request @prioritise_taxon_breadcrumbs = @disable_ga4 = disable_ga4 end |
Instance Attribute Details
#content_item ⇒ Object (readonly)
Returns the value of attribute content_item.
4 5 6 |
# File 'lib/govuk_publishing_components/presenters/breadcrumb_selector.rb', line 4 def content_item @content_item end |
#prioritise_taxon_breadcrumbs ⇒ Object (readonly)
Returns the value of attribute prioritise_taxon_breadcrumbs.
4 5 6 |
# File 'lib/govuk_publishing_components/presenters/breadcrumb_selector.rb', line 4 def @prioritise_taxon_breadcrumbs end |
#request ⇒ Object (readonly)
Returns the value of attribute request.
4 5 6 |
# File 'lib/govuk_publishing_components/presenters/breadcrumb_selector.rb', line 4 def request @request end |
Instance Method Details
#breadcrumbs ⇒ Object
13 14 15 |
# File 'lib/govuk_publishing_components/presenters/breadcrumb_selector.rb', line 13 def best_match_option[:breadcrumbs] end |
#step_by_step ⇒ Object
17 18 19 |
# File 'lib/govuk_publishing_components/presenters/breadcrumb_selector.rb', line 17 def step_by_step best_match_option[:step_by_step] end |