Method: Maglev::SectionComponent#initialize

Defined in:
app/components/maglev/section_component.rb

#initialize(parent:, attributes:, definition:, templates_root_path:, rendering_mode:) ⇒ SectionComponent

rubocop:disable Lint/MissingSuper



13
14
15
16
17
18
19
20
21
22
23
24
25
# File 'app/components/maglev/section_component.rb', line 13

def initialize(parent:, attributes:, definition:, templates_root_path:, rendering_mode:)
  @parent = parent # aka a PageComponent
  @id = attributes[:id]
  @type = attributes[:type]
  @definition = definition
  @attributes = attributes
  @templates_root_path = templates_root_path
  @rendering_mode = rendering_mode

  @settings = settings_proxy(
    build_settings_map(attributes[:settings])
  )
end