Sha256: 69b21e3cce2047fb3c598f2577d78f9b5104d2f27d7d68d3ab894eef9b74d86e

Contents?: true

Size: 465 Bytes

Versions: 4

Compression:

Stored size: 465 Bytes

Contents

module GovukPublishingComponents
  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

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
govuk_publishing_components-5.5.2 lib/govuk_publishing_components/step_nav.rb
govuk_publishing_components-5.5.1 lib/govuk_publishing_components/step_nav.rb
govuk_publishing_components-5.5.0 lib/govuk_publishing_components/step_nav.rb
govuk_publishing_components-5.4.1 lib/govuk_publishing_components/step_nav.rb