Class: Www::SaleBadgeComponent

Inherits:
ApplicationComponent show all
Defined in:
app/components/www/sale_badge_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(percentage:, size: :normal) ⇒ SaleBadgeComponent

Returns a new instance of SaleBadgeComponent.



2
3
4
5
# File 'app/components/www/sale_badge_component.rb', line 2

def initialize(percentage:, size: :normal)
  @percentage = percentage
  @size = size
end