Class: CookiesComponent
- Inherits:
-
ViewComponent::Base
- Object
- ViewComponent::Base
- CookiesComponent
- Defined in:
- app/components/cookies_component.rb
Instance Method Summary collapse
-
#initialize(text: nil) ⇒ CookiesComponent
constructor
A new instance of CookiesComponent.
Constructor Details
#initialize(text: nil) ⇒ CookiesComponent
Returns a new instance of CookiesComponent.
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
# File 'app/components/cookies_component.rb', line 6 def initialize(text: nil) unless text text = [] text << " You may delete and block all cookies from this site,\n but parts of the site will not work.\n EOS\n text << <<~EOS\n Click \"Accept\" if you consent usage of cookies,\n otherwise click \"Reject\".\n EOS\n end\n\n @text = text\nend\n" |