class UNotifier::Provider::ProviderBase
Public Class Methods
new(notification_conditions: [])
click to toggle source
# File lib/provider/provider_base.rb, line 4 def initialize(notification_conditions: []) @notification_conditions = notification_conditions end
Public Instance Methods
can_notify?(notification)
click to toggle source
# File lib/provider/provider_base.rb, line 8 def can_notify?(notification) return true if @notification_conditions.empty? @notification_conditions.all? { |c| c.call(notification) } end