module ActiveNotifier::Transports
Public Class Methods
for(channel, configuration, notifier)
click to toggle source
# File lib/active_notifier/transports.rb, line 8 def self.for(channel, configuration, notifier) transport_klass = self.constants.map do |klass_name| self.const_get(klass_name) end.detect do |klass| klass.channel == channel end || fail("No transport defined for channel '#{channel}'") transport_klass.new(configuration, notifier) end