Sha256: 1e1605593431fcc664152548f8464aa05b5826dd023f66d1c2e2f50053606820

Contents?: true

Size: 856 Bytes

Versions: 55

Compression:

Stored size: 856 Bytes

Contents

module DispatchRider
  class Publisher
    module ConfigurationReader

      class << self
        def load_config(configuration, publisher)
          configure_notification_services(configuration.notification_services, publisher)
          configure_destinations(configuration.destinations, publisher)
        end

        private

        def configure_notification_services(notification_services, publisher)
          notification_services.each do |service|
            publisher.register_notification_service(service.name, service.options)
          end
        end

        def configure_destinations(destinations, publisher)
          destinations.each do |destination|
            publisher.register_destination(destination.name, destination.service, destination.channel, destination.options)
          end
        end

      end

    end
  end
end

Version data entries

55 entries across 55 versions & 1 rubygems

Version Path
dispatch-rider-1.9.0 lib/dispatch-rider/publisher/configuration_reader.rb
dispatch-rider-1.8.6 lib/dispatch-rider/publisher/configuration_reader.rb
dispatch-rider-1.8.5 lib/dispatch-rider/publisher/configuration_reader.rb
dispatch-rider-1.8.4 lib/dispatch-rider/publisher/configuration_reader.rb
dispatch-rider-1.8.3 lib/dispatch-rider/publisher/configuration_reader.rb
dispatch-rider-1.8.2 lib/dispatch-rider/publisher/configuration_reader.rb
dispatch-rider-1.8.1 lib/dispatch-rider/publisher/configuration_reader.rb
dispatch-rider-1.8.0 lib/dispatch-rider/publisher/configuration_reader.rb
dispatch-rider-1.7.2 lib/dispatch-rider/publisher/configuration_reader.rb
dispatch-rider-1.7.1 lib/dispatch-rider/publisher/configuration_reader.rb
dispatch-rider-1.7.0 lib/dispatch-rider/publisher/configuration_reader.rb
dispatch-rider-1.6.2 lib/dispatch-rider/publisher/configuration_reader.rb
dispatch-rider-1.6.1 lib/dispatch-rider/publisher/configuration_reader.rb
dispatch-rider-1.6.0 lib/dispatch-rider/publisher/configuration_reader.rb
dispatch-rider-1.5.3 lib/dispatch-rider/publisher/configuration_reader.rb
dispatch-rider-1.5.2 lib/dispatch-rider/publisher/configuration_reader.rb
dispatch-rider-1.5.1 lib/dispatch-rider/publisher/configuration_reader.rb
dispatch-rider-1.5.0 lib/dispatch-rider/publisher/configuration_reader.rb
dispatch-rider-1.4.2 lib/dispatch-rider/publisher/configuration_reader.rb
dispatch-rider-1.4.0 lib/dispatch-rider/publisher/configuration_reader.rb