Class: Urkel::Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/urkel/configuration.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_host = '', api_key = '') ⇒ Configuration

Returns a new instance of Configuration.



5
6
7
8
# File 'lib/urkel/configuration.rb', line 5

def initialize(api_host = '', api_key = '')
  @api_host = api_host
  @api_key = api_key
end

Instance Attribute Details

#api_hostObject

Returns the value of attribute api_host.



3
4
5
# File 'lib/urkel/configuration.rb', line 3

def api_host
  @api_host
end

#api_keyObject

Returns the value of attribute api_key.



3
4
5
# File 'lib/urkel/configuration.rb', line 3

def api_key
  @api_key
end

Instance Method Details

#request(request) ⇒ Object



10
11
12
13
# File 'lib/urkel/configuration.rb', line 10

def request(request)
  request['authorization'] = "Token token=#{api_key}"
  http_connection.request(request)
end