Class: Pipedriver::Client

Inherits:
Object
  • Object
show all
Defined in:
lib/pipedriver/client.rb

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ Client

Returns a new instance of Client.



7
8
9
10
11
12
13
14
15
16
17
# File 'lib/pipedriver/client.rb', line 7

def initialize(options={})
  # Merge the config values from the module and those passed
  # to the client.
  merged_options = Pipedriver.options.merge(options)

  # Copy the merged values to this client and ignore those
  # not part of our configuration
  Configuration::VALID_CONFIG_KEYS.each do |key|
    send("#{key}=", merged_options[key])
  end
end