Class: AirbrakeSymbolicate::Airbrake

Inherits:
ActiveResource::Base
  • Object
show all
Defined in:
lib/airbrake_symbolicate.rb

Direct Known Subclasses

Error

Class Method Summary collapse

Class Method Details

.account=(a) ⇒ Object



70
71
72
73
# File 'lib/airbrake_symbolicate.rb', line 70

def account=(a)
  self.site = "https://#{a}.airbrake.io/" if a
  self.format = ActiveResource::Formats::XmlFormat
end

.append_auth_token_to_params(*arguments) ⇒ Object

Raises:

  • (RuntimeError)


80
81
82
83
84
85
86
87
88
# File 'lib/airbrake_symbolicate.rb', line 80

def append_auth_token_to_params(*arguments)
  raise RuntimeError.new("Airbrake.auth_token must be set!") if !auth_token

  opts = arguments.last.is_a?(Hash) ? arguments.pop : {}
  opts = opts.has_key?(:params) ? opts : opts.merge(:params => {})
  opts[:params] = opts[:params].merge(:auth_token => auth_token)
  arguments << opts
  arguments
end

.find(*arguments) ⇒ Object



75
76
77
78
# File 'lib/airbrake_symbolicate.rb', line 75

def find(*arguments)
  arguments = append_auth_token_to_params(*arguments)
  super(*arguments)
end