module Erorr

Constants

VERSION

Public Instance Methods

config() click to toggle source
# File lib/erorr.rb, line 10
def config
  @config ||= Config.new
end
configure() { |config| ... } click to toggle source
# File lib/erorr.rb, line 14
def configure
  yield config if block_given?
end
logger() click to toggle source
# File lib/erorr.rb, line 18
def logger
  config.logger
end
notify(exception, params = {}) click to toggle source
# File lib/erorr.rb, line 22
def notify(exception, params = {})
  return false unless config.validate

  notification = Notification.new exception, params

  transport.deliver notification.to_params

  true
rescue => e
  logger.error "[erorr] Internal error: #{e.inspect}"

  false
end

Private Instance Methods

transport() click to toggle source
# File lib/erorr.rb, line 38
def transport
  @_transport ||= Erorr::Transport::HTTPAsync.new
end