Class: SaasPlatform::NotificationComponent

Inherits:
ViewComponent::Base
  • Object
show all
Defined in:
app/components/saas_platform/notification_component.rb

Instance Method Summary collapse

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

Returns:

  • (Boolean)


7
8
9
# File 'app/components/saas_platform/notification_component.rb', line 7

def render?
  @notifications.any?
end