Sha256: c3f83d99396b6abae6c3945c8e8aa139720205fdc84f63e492292f6d8e55979c

Contents?: true

Size: 529 Bytes

Versions: 5

Compression:

Stored size: 529 Bytes

Contents

module GovukPublishingComponents
  module AppHelpers
    class StepNav
      def initialize(content_item)
        @content_item = content_item.deep_symbolize_keys
      end

      def title
        content_item[:title]
      end

      def base_path
        content_item[:base_path]
      end

      def content
        content_item.dig(:details, :step_by_step_nav)
      end

      def steps
        content_item.dig(:details, :step_by_step_nav, :steps)
      end

    private

      attr_reader :content_item
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
govuk_publishing_components-5.6.0 lib/govuk_publishing_components/app_helpers/step_nav.rb
govuk_publishing_components-5.5.6 lib/govuk_publishing_components/app_helpers/step_nav.rb
govuk_publishing_components-5.5.5 lib/govuk_publishing_components/app_helpers/step_nav.rb
govuk_publishing_components-5.5.4 lib/govuk_publishing_components/app_helpers/step_nav.rb
govuk_publishing_components-5.5.3 lib/govuk_publishing_components/app_helpers/step_nav.rb