Class: DesignSystem::Generic::Builders::FixedElements
- Includes:
- Elements::Backlink, Elements::Breadcrumbs, Elements::Form, Elements::Headings, Elements::LeadParagraph
- Defined in:
- lib/design_system/generic/builders/fixed_elements.rb
Overview
This class is used to provide the generic fixed elements builder.
Direct Known Subclasses
Instance Method Summary collapse
Methods included from Elements::LeadParagraph
Methods included from Elements::Headings
Methods included from Elements::Form
Methods included from Elements::Breadcrumbs
Methods included from Elements::Backlink
Methods inherited from Base
Methods included from Helpers::CssHelper
Methods included from Concerns::BrandDerivable
Constructor Details
This class inherits a constructor from DesignSystem::Generic::Builders::Base
Instance Method Details
#render ⇒ Object
14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
# File 'lib/design_system/generic/builders/fixed_elements.rb', line 14 def render raise ArgumentError, 'Cannot use both backlink and breadcrumbs' if @backlink && @breadcrumbs.present? if @breadcrumbs.present? content_for_backlink if @backlink.present? render_main_container do safe_buffer = ActiveSupport::SafeBuffer.new safe_buffer.concat(render_main_heading) if @main_heading safe_buffer.concat(render_lead_paragraph) if @lead_paragraph safe_buffer.concat(render_form) if @form_object safe_buffer end end |