Class: Www::SaleBadgeComponent
- Inherits:
-
ApplicationComponent
- Object
- ViewComponent::Base
- ApplicationComponent
- Www::SaleBadgeComponent
- Defined in:
- app/components/www/sale_badge_component.rb
Instance Method Summary collapse
-
#initialize(percentage:, size: :normal) ⇒ SaleBadgeComponent
constructor
A new instance of SaleBadgeComponent.
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 |