class PipedriveRuby::PipedriveClient
This class is for hold the client informations (API TOKEN, resources)
Attributes
api_token[R]
Public Class Methods
new(api_token)
click to toggle source
# File lib/pipedrive_client.rb, line 8 def initialize(api_token) @api_token = api_token end
Public Instance Methods
method_missing(method)
click to toggle source
this delegation is only to allow user make PipedriveClient.new
(“token”).resource where resource could be deals organizations etc…
# File lib/pipedrive_client.rb, line 14 def method_missing(method) begin class_name = 'PipedriveRuby::' + method.to_s.split("_").collect(&:capitalize).join Object.const_get(class_name).new(self) rescue NameError "#{method} class not found" end end