Module: Pipedrive

Extended by:
Pipedrive
Included in:
Pipedrive
Defined in:
lib/pipedrive.rb,
lib/pipedrive/base.rb,
lib/pipedrive/deal.rb,
lib/pipedrive/file.rb,
lib/pipedrive/goal.rb,
lib/pipedrive/note.rb,
lib/pipedrive/role.rb,
lib/pipedrive/user.rb,
lib/pipedrive/stage.rb,
lib/pipedrive/utils.rb,
lib/pipedrive/filter.rb,
lib/pipedrive/person.rb,
lib/pipedrive/product.rb,
lib/pipedrive/version.rb,
lib/pipedrive/activity.rb,
lib/pipedrive/pipeline.rb,
lib/pipedrive/railties.rb,
lib/pipedrive/deal_field.rb,
lib/pipedrive/organization.rb,
lib/pipedrive/person_field.rb,
lib/pipedrive/activity_type.rb,
lib/pipedrive/product_field.rb,
lib/pipedrive/operations/read.rb,
lib/pipedrive/operations/create.rb,
lib/pipedrive/operations/delete.rb,
lib/pipedrive/operations/update.rb,
lib/pipedrive/organization_field.rb

Defined Under Namespace

Modules: Operations, Utils Classes: Activity, ActivityType, Base, Deal, DealField, File, Filter, Goal, Note, Organization, OrganizationField, Person, PersonField, Pipeline, Product, ProductField, Railties, Role, Stage, User

Constant Summary collapse

VERSION =
'0.3.0'

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#api_tokenObject

Returns the value of attribute api_token.



15
16
17
# File 'lib/pipedrive.rb', line 15

def api_token
  @api_token
end

#debugObject

Returns the value of attribute debug.



15
16
17
# File 'lib/pipedrive.rb', line 15

def debug
  @debug
end

#loggerObject



37
38
39
# File 'lib/pipedrive.rb', line 37

def logger
  @logger ||= Logger.new($stdout)
end

#user_agentObject



28
29
30
# File 'lib/pipedrive.rb', line 28

def user_agent
  @user_agent ||= "Pipedrive Ruby Client v#{::Pipedrive::VERSION}"
end

Instance Method Details

#reset!Object



21
22
23
24
25
26
# File 'lib/pipedrive.rb', line 21

def reset!
  @logger = nil
  @_ran_once = false
  @user_agent = nil
  @api_token = nil
end

#setup {|_self| ... } ⇒ Object

Yields:

  • (_self)

Yield Parameters:

  • _self (Pipedrive)

    the object that the method was called on



32
33
34
35
# File 'lib/pipedrive.rb', line 32

def setup
  yield self unless @_ran_once
  @_ran_once = true
end