Method: SparkApi::Client#initialize

Defined in:
lib/spark_api/client.rb

#initialize(options = {}) ⇒ Client

Constructor bootstraps the client with configuration and authorization class. options - see Configuration::VALID_OPTION_KEYS



19
20
21
22
23
24
25
26
# File 'lib/spark_api/client.rb', line 19

def initialize(options={})
  options = SparkApi.options.merge(options)
  Configuration::VALID_OPTION_KEYS.each do |key|
    send("#{key}=", options[key])
  end
  # Instanciate the authenication class passed in.
  @authenticator = authentication_mode.send("new", self)
end