Sha256: 6cc004aec83b3676423df471479dd217a08d49bd6c1e1ae6b7b1ed498e9e051a

Contents?: true

Size: 679 Bytes

Versions: 209

Compression:

Stored size: 679 Bytes

Contents

module GovukPublishingComponents
  module Presenters
    class TaxonomyListHelper
      def initialize(image_cards)
        @image_cards = image_cards
      end

      def image_card_data
        @image_cards[:items].map do |image_card|
          {
            context: image_card[:image][:context],
            href: image_card[:link][:path],
            heading_text: image_card[:link][:text],
            image_src: image_card[:image][:url],
            image_alt: image_card[:image][:alt],
            heading_level: image_card[:link][:heading_level],
            href_data_attributes: image_card[:link][:data_attributes],
          }
        end
      end
    end
  end
end

Version data entries

209 entries across 209 versions & 1 rubygems

Version Path
govuk_publishing_components-27.20.0 lib/govuk_publishing_components/presenters/taxonomy_list_helper.rb
govuk_publishing_components-27.19.0 lib/govuk_publishing_components/presenters/taxonomy_list_helper.rb
govuk_publishing_components-27.18.0 lib/govuk_publishing_components/presenters/taxonomy_list_helper.rb
govuk_publishing_components-27.17.0 lib/govuk_publishing_components/presenters/taxonomy_list_helper.rb
govuk_publishing_components-27.16.0 lib/govuk_publishing_components/presenters/taxonomy_list_helper.rb
govuk_publishing_components-27.15.0 lib/govuk_publishing_components/presenters/taxonomy_list_helper.rb
govuk_publishing_components-27.14.2 lib/govuk_publishing_components/presenters/taxonomy_list_helper.rb
govuk_publishing_components-27.14.1 lib/govuk_publishing_components/presenters/taxonomy_list_helper.rb
govuk_publishing_components-27.14.0 lib/govuk_publishing_components/presenters/taxonomy_list_helper.rb
govuk_publishing_components-27.13.0 lib/govuk_publishing_components/presenters/taxonomy_list_helper.rb
govuk_publishing_components-27.12.0 lib/govuk_publishing_components/presenters/taxonomy_list_helper.rb
govuk_publishing_components-27.11.0 lib/govuk_publishing_components/presenters/taxonomy_list_helper.rb
govuk_publishing_components-27.10.5 lib/govuk_publishing_components/presenters/taxonomy_list_helper.rb
govuk_publishing_components-27.10.4 lib/govuk_publishing_components/presenters/taxonomy_list_helper.rb
govuk_publishing_components-27.10.3 lib/govuk_publishing_components/presenters/taxonomy_list_helper.rb
govuk_publishing_components-27.10.2 lib/govuk_publishing_components/presenters/taxonomy_list_helper.rb
govuk_publishing_components-27.10.1 lib/govuk_publishing_components/presenters/taxonomy_list_helper.rb
govuk_publishing_components-27.10.0 lib/govuk_publishing_components/presenters/taxonomy_list_helper.rb
govuk_publishing_components-27.9.2 lib/govuk_publishing_components/presenters/taxonomy_list_helper.rb
govuk_publishing_components-27.9.1 lib/govuk_publishing_components/presenters/taxonomy_list_helper.rb