Class: SaasPlatform::NotificationComponent
- Inherits:
-
ViewComponent::Base
- Object
- ViewComponent::Base
- SaasPlatform::NotificationComponent
- Defined in:
- app/components/saas_platform/notification_component.rb
Instance Method Summary collapse
-
#initialize(notifications:) ⇒ NotificationComponent
constructor
A new instance of NotificationComponent.
- #render? ⇒ Boolean
Constructor Details
#initialize(notifications:) ⇒ NotificationComponent
Returns a new instance of NotificationComponent.
3 4 5 |
# File 'app/components/saas_platform/notification_component.rb', line 3 def initialize(notifications:) @notifications = notifications end |
Instance Method Details
#render? ⇒ Boolean
7 8 9 |
# File 'app/components/saas_platform/notification_component.rb', line 7 def render? @notifications.any? end |