Class: CCS::Components::GovUK::StepByStepNavigation::Section::Content::Paragraph

Inherits:
Object
  • Object
show all
Includes:
ActionView::Context, ActionView::Helpers
Defined in:
lib/ccs/components/govuk/step_by_step_navigation/section/content/paragraph.rb

Overview

GOV.UK Step by step navigation section content paragraph

Generates the paragraph HTML for the step by step navigation section content

Instance Method Summary collapse

Constructor Details

#initialize(text:) ⇒ Paragraph

Returns a new instance of Paragraph.

Parameters:

  • text (String)

    the text for the paragraph



28
29
30
# File 'lib/ccs/components/govuk/step_by_step_navigation/section/content/paragraph.rb', line 28

def initialize(text:)
  @text = text
end

Instance Method Details

#renderActiveSupport::SafeBuffer

Generates the HTML for the GOV.UK Step by step navigation section content paragraph

Returns:

  • (ActiveSupport::SafeBuffer)


36
37
38
# File 'lib/ccs/components/govuk/step_by_step_navigation/section/content/paragraph.rb', line 36

def render
  tag.p(text, class: 'gem-c-step-nav__paragraph')
end