Module: Raven

Extended by:
Raven
Included in:
Raven
Defined in:
lib/raven.rb,
lib/rb_raven_api/http.rb,
lib/rb_raven_api/config.rb,
lib/rb_raven_api/domain.rb,
lib/rb_raven_api/engines.rb,
lib/rb_raven_api/keyword.rb,
lib/rb_raven_api/profile.rb,
lib/rb_raven_api/response.rb,
lib/rb_raven_api/competitors.rb,
lib/rb_raven_api/request_error.rb

Defined Under Namespace

Classes: Competitors, Config, Domain, Engines, Http, Keyword, Profile, RequestError, Response

Instance Method Summary collapse

Instance Method Details

#configRaven::Config

Returns:



40
41
42
# File 'lib/raven.rb', line 40

def config
  @config ||= Config.new
end

#configure(api_key = nil) ⇒ Object

Examples:

Configure takes block to set API key to be used in API calls.

Raven.configure do |config|
  config.api_key = 'my-key'
end

Configure can also just take an api_key

Raven.configure 'my-key'


29
30
31
32
33
34
35
# File 'lib/raven.rb', line 29

def configure api_key = nil
  if block_given?
    yield config
  else
    config.api_key = api_key
  end
end

#httpObject



44
45
46
# File 'lib/raven.rb', line 44

def http # @private
  Http.new(config)
end