Module: Yeller

Defined in:
lib/yeller.rb,
lib/yeller/rack.rb,
lib/yeller/rails.rb,
lib/yeller/client.rb,
lib/yeller/server.rb,
lib/yeller/version.rb,
lib/yeller/configuration.rb,
lib/yeller/startup_params.rb,
lib/yeller/ignoring_client.rb,
lib/yeller/backtrace_filter.rb,
lib/yeller/log_error_handler.rb,
lib/yeller/exception_formatter.rb

Defined Under Namespace

Classes: BacktraceFilter, Client, Configuration, ExceptionFormatter, IgnoringClient, LogErrorHandler, Rack, Rails, SecureServer, Server, StartupParams

Constant Summary collapse

VERSION =
"0.0.3"

Class Method Summary collapse

Class Method Details

.build_client(config) ⇒ Object



21
22
23
24
25
26
27
28
29
30
31
32
33
# File 'lib/yeller.rb', line 21

def self.build_client(config)
  if config.ignore_exceptions?
    Yeller::IgnoringClient.new
  else
    Yeller::Client.new(
      config.servers,
      config.token,
      Yeller::StartupParams.defaults(config.startup_params),
      Yeller::BacktraceFilter.new(config.backtrace_filters),
      config.error_handler
    )
  end
end

.client(&block) ⇒ Object



15
16
17
18
19
# File 'lib/yeller.rb', line 15

def self.client(&block)
  config = Yeller::Configuration.new
  block.call(config)
  build_client(config)
end