Class: Www::ProductCategoryCardsComponent
- Inherits:
-
ApplicationComponent
- Object
- ViewComponent::Base
- ApplicationComponent
- Www::ProductCategoryCardsComponent
- Defined in:
- app/components/www/product_category_cards_component.rb
Constant Summary collapse
- DEFAULT_ICON =
'box-open'
Instance Method Summary collapse
-
#initialize(section_title: nil, section_icon: nil, description: nil, categories: [], border: nil) ⇒ ProductCategoryCardsComponent
constructor
A new instance of ProductCategoryCardsComponent.
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(section_title: nil, section_icon: nil, description: nil, categories: [], border: nil) ⇒ ProductCategoryCardsComponent
Returns a new instance of ProductCategoryCardsComponent.
11 12 13 14 15 16 17 18 |
# File 'app/components/www/product_category_cards_component.rb', line 11 def initialize(section_title: nil, section_icon: nil, description: nil, categories: [], border: nil) super() @section_title = section_title @section_icon = section_icon || DEFAULT_ICON @description = description @categories = Array(categories) @border = border end |