Class: Exceptions::Backends::Multi

Inherits:
Exceptions::Backend show all
Defined in:
lib/exceptions/backends/multi.rb

Overview

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Exceptions::Backend

#clear_context, #context, #rack_exception

Constructor Details

#initialize(*backends) ⇒ Multi

Returns a new instance of Multi.



8
9
10
# File 'lib/exceptions/backends/multi.rb', line 8

def initialize(*backends)
  @backends = backends
end

Instance Attribute Details

#backendsObject (readonly)

Returns the value of attribute backends.



6
7
8
# File 'lib/exceptions/backends/multi.rb', line 6

def backends
  @backends
end

Instance Method Details

#notify(exception, options = {}) ⇒ Object



12
13
14
15
16
# File 'lib/exceptions/backends/multi.rb', line 12

def notify(exception, options = {})
  backends.each do |backend|
    backend.notify exception, options
  end
end