Class: Www::BenefitsListComponent

Inherits:
ApplicationComponent show all
Includes:
IconHelper
Defined in:
app/components/www/benefits_list_component.rb

Constant Summary

Constants included from IconHelper

IconHelper::CUSTOM_ICON_MAP, IconHelper::CUSTOM_SVG_DIR, IconHelper::DEFAULT_FAMILY

Instance Method Summary collapse

Methods included from IconHelper

#account_nav_icon, #fa_icon, #star_rating_html

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(benefits: [], extra_classes: nil, pattern_background: true, section_title: nil, section_description: nil, border: nil) ⇒ BenefitsListComponent

Returns a new instance of BenefitsListComponent.

Parameters:

  • border (Symbol, nil) (defaults to: nil)

    Border style: :top, :bottom, or :both

  • benefits (Array<Object>) (defaults to: [])
  • extra_classes (Object, nil) (defaults to: nil)
  • pattern_background (Boolean) (defaults to: true)
  • section_title (Object, nil) (defaults to: nil)
  • section_description (Object, nil) (defaults to: nil)


12
13
14
15
16
17
18
19
20
# File 'app/components/www/benefits_list_component.rb', line 12

def initialize(benefits: [], extra_classes: nil, pattern_background: true, section_title: nil, section_description: nil, border: nil)
  super()
  @benefits = Array(benefits)
  @extra_classes = extra_classes
  @pattern_background = pattern_background
  @section_title = section_title
  @section_description = section_description
  @border = border
end