Class: Playapi::Client

Inherits:
Object
  • Object
show all
Includes:
Configurable
Defined in:
lib/playapi/client.rb

Constant Summary

Constants included from Configurable

Playapi::Configurable::DEFAULT_CONNECTION_MIDDLEWARE

Instance Attribute Summary

Attributes included from Configurable

#client_id, #client_secret, #connection_middleware, #connection_options, #endpoint, #identity_map, #oauth_token

Instance Method Summary collapse

Methods included from Configurable

#configure, #credentials?, keys, #reset!

Constructor Details

#initialize(options = {}) ⇒ Client

Returns a new instance of Client.



9
10
11
12
13
# File 'lib/playapi/client.rb', line 9

def initialize(options={})
  Playapi::Configurable.keys.each do |key|
    instance_variable_set(:"@#{key}", options[key] || Playapi.instance_variable_get(:"@#{key}"))
  end
end