Class: GovukPublishingComponents::Presenters::BreadcrumbSelector

Inherits:
Object
  • Object
show all
Defined in:
lib/govuk_publishing_components/presenters/breadcrumb_selector.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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, prioritise_taxon_breadcrumbs, disable_ga4)
  @content_item = content_item
  @request = request
  @prioritise_taxon_breadcrumbs = prioritise_taxon_breadcrumbs
  @disable_ga4 = disable_ga4
end

Instance Attribute Details

#content_itemObject (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_breadcrumbsObject (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
  @prioritise_taxon_breadcrumbs
end

#requestObject (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



13
14
15
# File 'lib/govuk_publishing_components/presenters/breadcrumb_selector.rb', line 13

def breadcrumbs
  best_match_option[:breadcrumbs]
end

#step_by_stepObject



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