Skip to content

Commit

Permalink
Documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
tylercunnion committed Nov 7, 2011
1 parent 0ac82c2 commit 0ac5038
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 2 deletions.
2 changes: 2 additions & 0 deletions lib/crunchbase/cb_object.rb
@@ -1,4 +1,6 @@
module Crunchbase

# Represents any object which can be pulled directly from the CB API.
class CB_Object

# Returns an array of tags
Expand Down
3 changes: 2 additions & 1 deletion lib/crunchbase/company.rb
Expand Up @@ -13,7 +13,8 @@ class Company < CB_Object
:providerships, :total_money_raised, :funding_rounds, :investments,
:acquisition, :acquisitions, :offices, :milestones, :ipo, :video_embeds,
:screenshots, :external_links


# Factory method to return a Company instance from a permalink
def self.get(permalink)
j = API.company(permalink)
c = Company.new(j)
Expand Down
1 change: 1 addition & 0 deletions lib/crunchbase/financial_organization.rb
Expand Up @@ -11,6 +11,7 @@ class FinancialOrganization < CB_Object
:overview, :image, :offices, :relationships, :investments, :milestones,
:providerships, :funds, :video_embeds, :external_links

# Factory method to return a FinancialOrganization instance from a permalink
def self.get(permalink)
j = API.financial_organization(permalink)
f = FinancialOrganization.new(j)
Expand Down
1 change: 1 addition & 0 deletions lib/crunchbase/person.rb
Expand Up @@ -11,6 +11,7 @@ class Person < CB_Object
:overview, :relationships, :investments, :milestones, :video_embeds,
:external_links, :web_presences

# Factory method to return a Person instance from a permalink
def self.get(permalink)
j = API.person(permalink)
p = Person.new(j)
Expand Down
2 changes: 2 additions & 0 deletions lib/crunchbase/relationship.rb
@@ -1,4 +1,6 @@
module Crunchbase
# Superclass for all relationships. Used for both the relationships and
# providerships arrays on retrieved objects.
class Relationship

attr_reader :title
Expand Down
3 changes: 2 additions & 1 deletion lib/crunchbase/service_provider.rb
Expand Up @@ -5,7 +5,8 @@ class ServiceProvider < CB_Object
attr_reader :name, :permalink, :crunchbase_url, :homepage_url,
:phone_number, :tag_list, :alias_list, :created_at, :updated_at,
:overview, :image, :offices, :providerships, :external_links


# Factory method to return a ServiceProvider instance from a permalink
def self.get(permalink)
j = API.service_provider(permalink)
s = ServiceProvider.new(j)
Expand Down

0 comments on commit 0ac5038

Please sign in to comment.