Class: DesignSystem::Generic::Builders::FixedElements

Inherits:
Base
  • Object
show all
Includes:
Elements::Breadcrumbs, Elements::Form, Elements::Headings
Defined in:
lib/design_system/generic/builders/fixed_elements.rb

Overview

This class is used to provide the generic fixed elements builder.

Instance Method Summary collapse

Methods included from Elements::Headings

#main_heading

Methods included from Elements::Form

#form

Methods included from Elements::Breadcrumbs

#breadcrumb

Methods inherited from Base

#initialize

Methods included from Helpers::CssHelper

#css_class_options_merge

Methods included from Concerns::BrandDerivable

#brand

Constructor Details

This class inherits a constructor from DesignSystem::Generic::Builders::Base

Instance Method Details

#renderObject



12
13
14
15
16
17
18
19
20
21
22
23
# File 'lib/design_system/generic/builders/fixed_elements.rb', line 12

def render
  content_for_breadcrumbs if @breadcrumbs.present?

  render_main_container do
    safe_buffer = ActiveSupport::SafeBuffer.new

    safe_buffer.concat(render_main_heading) if @main_heading
    safe_buffer.concat(render_form) if @form_object

    safe_buffer
  end
end