Class: Www::SnowMeltingQuoteFormComponent

Inherits:
ApplicationComponent show all
Defined in:
app/components/www/snow_melting_quote_form_component.rb

Overview

ViewComponent: renders the snow melting quote form block.

Presents the snow-melting quote wizard fields (surface type, coverage type,
car count, postal code) that feed the quote builder.

Instance Method Summary collapse

Methods inherited from ApplicationComponent

#cms_link, #fetch_or_fallback, #image_asset_tag, #image_tag, #number_to_currency, #number_with_delimiter, #post_path, #post_url, #strip_tags

Constructor Details

#initialize(room_type: 'driveway', header_variant: :bold, show_postal_code: true) ⇒ void

Builds the quote form component.

Parameters:

  • room_type (String) (defaults to: 'driveway')

    the preselected room/surface context (default: 'driveway')

  • header_variant (Symbol) (defaults to: :bold)

    heading style variant (default: :bold)

  • show_postal_code (Boolean) (defaults to: true)

    whether to render the postal/zip code field



16
17
18
19
20
21
# File 'app/components/www/snow_melting_quote_form_component.rb', line 16

def initialize(room_type: 'driveway', header_variant: :bold, show_postal_code: true)
  super()
  @room_type = room_type
  @header_variant = header_variant
  @show_postal_code = show_postal_code
end