Class: GovukPublishingComponents::Presenters::StepByStepModel
- Inherits:
-
Object
- Object
- GovukPublishingComponents::Presenters::StepByStepModel
- Defined in:
- lib/govuk_publishing_components/presenters/page_with_step_by_step_navigation.rb
Instance Method Summary collapse
- #base_path ⇒ Object
- #content ⇒ Object
- #content_id ⇒ Object
-
#initialize(content_item) ⇒ StepByStepModel
constructor
A new instance of StepByStepModel.
- #steps ⇒ Object
- #title ⇒ Object
Constructor Details
#initialize(content_item) ⇒ StepByStepModel
Returns a new instance of StepByStepModel.
199 200 201 |
# File 'lib/govuk_publishing_components/presenters/page_with_step_by_step_navigation.rb', line 199 def initialize(content_item) @content_item = content_item.deep_symbolize_keys end |
Instance Method Details
#base_path ⇒ Object
207 208 209 |
# File 'lib/govuk_publishing_components/presenters/page_with_step_by_step_navigation.rb', line 207 def base_path content_item[:base_path] end |
#content ⇒ Object
215 216 217 |
# File 'lib/govuk_publishing_components/presenters/page_with_step_by_step_navigation.rb', line 215 def content content_item.dig(:details, :step_by_step_nav) end |
#content_id ⇒ Object
211 212 213 |
# File 'lib/govuk_publishing_components/presenters/page_with_step_by_step_navigation.rb', line 211 def content_id content_item[:content_id] end |
#steps ⇒ Object
219 220 221 |
# File 'lib/govuk_publishing_components/presenters/page_with_step_by_step_navigation.rb', line 219 def steps content_item.dig(:details, :step_by_step_nav, :steps) end |
#title ⇒ Object
203 204 205 |
# File 'lib/govuk_publishing_components/presenters/page_with_step_by_step_navigation.rb', line 203 def title content_item[:title] end |