Module: AirbrakeAPI

Extended by:
AirbrakeAPI
Included in:
AirbrakeAPI
Defined in:
lib/airbrake-api.rb,
lib/airbrake-api/error.rb,
lib/airbrake-api/client.rb,
lib/airbrake-api/notice.rb,
lib/airbrake-api/project.rb,
lib/airbrake-api/version.rb

Defined Under Namespace

Classes: AirbrakeError, Base, Error, Notice, Project

Constant Summary collapse

VERSION =
'3.3.0'

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#accountObject

Returns the value of attribute account.



6
7
8
# File 'lib/airbrake-api.rb', line 6

def 
  @account
end

#auth_tokenObject

Returns the value of attribute auth_token.



6
7
8
# File 'lib/airbrake-api.rb', line 6

def auth_token
  @auth_token
end

#secureObject

Returns the value of attribute secure.



6
7
8
# File 'lib/airbrake-api.rb', line 6

def secure
  @secure
end

Instance Method Details

#account_pathObject



16
17
18
# File 'lib/airbrake-api.rb', line 16

def 
  "#{protocol}://#{@account}.airbrake.io"
end

#configure(options = {}) ⇒ Object



10
11
12
13
14
# File 'lib/airbrake-api.rb', line 10

def configure(options={})
  @account = options[:account] if options.has_key?(:account)
  @auth_token = options[:auth_token] if options.has_key?(:auth_token)
  @secure = options[:secure] if options.has_key?(:secure)
end

#protocolObject



20
21
22
# File 'lib/airbrake-api.rb', line 20

def protocol
  secure ? "https" : "http"
end