Sha256: f326e450fb811cbdc46fff42d21f1830319c45f2125d29a70707d9911749a18e
Contents?: true
Size: 339 Bytes
Versions: 1
Compression:
Stored size: 339 Bytes
Contents
require 'securerandom' module FakeServiceBus class CatchErrors def initialize(app, options = {}) @app = app @response = options.fetch(:response) end def call(env) @app.call(env) rescue => error response = @response.new(error) [ response.status, {}, [ response.body ] ] end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
fake_servicebus-0.0.2 | lib/fake_servicebus/catch_errors.rb |