Class: Www::TrainingCardComponent

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

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(title:, description:, image_slug:, image_alt:, link_url:, link_text: 'Start Training') ⇒ TrainingCardComponent

Returns a new instance of TrainingCardComponent.



2
3
4
5
6
7
8
9
# File 'app/components/www/training_card_component.rb', line 2

def initialize(title:, description:, image_slug:, image_alt:, link_url:, link_text: 'Start Training')
  @title = title
  @description = description
  @image_slug = image_slug
  @image_alt = image_alt
  @link_url = link_url
  @link_text = link_text
end