module ExceptionGateway
Constants
- VERSION
Public Class Methods
alert(msg, options={})
click to toggle source
# File lib/exception_gateway.rb, line 25 def self.alert(msg, options={}) method = "#{@@config.backend}_alert".to_s @@gateway.send method, msg, options end
config()
click to toggle source
# File lib/exception_gateway.rb, line 21 def self.config @@config end
configure() { |c| ... }
click to toggle source
# File lib/exception_gateway.rb, line 14 def self.configure c = Config.new yield c @@config = c @@gateway = Gateway.new end
time(msg) { || ... }
click to toggle source
# File lib/exception_gateway.rb, line 35 def self.time(msg) start_time = Time.now yield_value = yield end_time = Time.now self.alert(msg, :time => "#{(end_time - start_time) * 1000} ms") end
transmit(exception)
click to toggle source
# File lib/exception_gateway.rb, line 30 def self.transmit(exception) method = "#{@@config.backend}_transmit".to_s @@gateway.send method, exception end