Class: GovukPublishingComponents::Presenters::Breadcrumbs

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

Instance Method Summary collapse

Constructor Details

#initialize(breadcrumbs) ⇒ Breadcrumbs

Returns a new instance of Breadcrumbs.



4
5
6
# File 'lib/govuk_publishing_components/presenters/breadcrumbs_helper.rb', line 4

def initialize(breadcrumbs)
  @breadcrumbs = breadcrumbs
end

Instance Method Details

#structured_dataObject



8
9
10
11
12
13
14
# File 'lib/govuk_publishing_components/presenters/breadcrumbs_helper.rb', line 8

def structured_data
  {
    "@context" => "http://schema.org",
    "@type" => "BreadcrumbList",
    "itemListElement" => item_list_element,
  }
end