class Exceptions::Backends::Multi

Public: Multi is an implementation of the Backend interface for wrapping multiple backends as a single Backend.

Attributes

backends[R]

Public Class Methods

new(*backends) click to toggle source
# File lib/exceptions/backends/multi.rb, line 8
def initialize(*backends)
  @backends = backends
end

Public Instance Methods

notify(exception, options = {}) click to toggle source
# File lib/exceptions/backends/multi.rb, line 12
def notify(exception, options = {})
  results = backends.map do |backend|
    backend.notify exception, options
  end

  MultiResult.new results.map(&:id), results.map(&:url)
end